Trait gix_object::WriteTo
source · 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 Blob
impl WriteTo for Commit
impl WriteTo for Tag
impl WriteTo for Tree
Serialization
impl<'a> WriteTo for ObjectRef<'a>
Serialization
impl<'a> WriteTo for BlobRef<'a>
impl<'a> WriteTo for CommitRef<'a>
impl<'a> WriteTo for TagRef<'a>
impl<'a> WriteTo for TreeRef<'a>
Serialization