pub trait WriteTo {
// Required methods
fn write_to(&self, out: &mut dyn Write) -> Result<()>;
fn kind(&self) -> Kind;
fn size(&self) -> u64;
// Provided method
fn loose_header(&self) -> SmallVec<[u8; 28]> { ... }
}
Expand description
Writing of objects to a Write
implementation
Required Methods§
Sourcefn write_to(&self, out: &mut dyn Write) -> Result<()>
fn write_to(&self, out: &mut dyn Write) -> Result<()>
Write a representation of this instance to out
.
Provided Methods§
Sourcefn loose_header(&self) -> SmallVec<[u8; 28]>
fn loose_header(&self) -> SmallVec<[u8; 28]>
Returns a loose object header based on the object’s data
Implementations on Foreign Types§
Implementors§
impl WriteTo for Object
Serialization
impl WriteTo for ObjectRef<'_>
Serialization
impl WriteTo for Blob
impl WriteTo for BlobRef<'_>
impl WriteTo for Commit
impl WriteTo for CommitRef<'_>
impl WriteTo for Tag
impl WriteTo for TagRef<'_>
impl WriteTo for Tree
Serialization
impl WriteTo for TreeRef<'_>
Serialization