git_odb_stream

A stream to read/write from a backend.

This represents a stream of data being written to or read from a backend. When writing, the frontend functions take care of calculating the object's id and all finalize_write needs to do is store the object with the id it is passed.

Members

Variables

backend
libgit2_d.types.git_odb_backend* backend;
Undocumented in source.
declared_size
libgit2_d.types.git_object_size_t declared_size;
Undocumented in source.
finalize_write
int function(.git_odb_stream* stream, const(libgit2_d.oid.git_oid)* oid) finalize_write;

Store the contents of the stream as an object with the id specified in oid.

free
void function(.git_odb_stream* stream) free;

Free the stream's memory.

hash_ctx
void* hash_ctx;
Undocumented in source.
mode
uint mode;
Undocumented in source.
read
int function(.git_odb_stream* stream, char* buffer, size_t len) read;

Write at most len bytes into buffer and advance the stream.

received_bytes
libgit2_d.types.git_object_size_t received_bytes;
Undocumented in source.
write
int function(.git_odb_stream* stream, const(char)* buffer, size_t len) write;

Write len bytes from buffer into the stream.

Meta