Trait git_object::WriteTo[][src]

pub trait WriteTo {
    fn write_to(&self, out: impl Write) -> Result<()>;
fn kind(&self) -> Kind;
fn size(&self) -> usize; fn loose_header(&self) -> SmallVec<[u8; 28]> { ... } }
Expand description

Writing of objects to a Write implementation

Required methods

Write a representation of this instance to out.

Returns the type of this object.

Returns the size of this object’s representation (the amount of data which would be written by write_to).

size’s value has no bearing on the validity of the object, as such it’s possible for size to return a sensible value but write_to to fail because the object was not actually valid in some way.

Provided methods

Returns a loose object header based on the object’s data

Implementations on Foreign Types

Implementors

Serialization

Serialization

Serialization

Serialization