pub trait ObjectSink {
// Required method
fn write_object(&mut self, bytes: &[u8]) -> Result<Hash, BridgeError>;
// Provided method
fn kind_of(&self, _h: &Hash) -> Option<ObjectType> { ... }
}Expand description
Where serialized mkit objects land. Implemented for
mkit_core::ObjectStore (per-object fsync) and the CLI’s bulk
writer; tests use an in-memory map.
Required Methods§
fn write_object(&mut self, bytes: &[u8]) -> Result<Hash, BridgeError>
Provided Methods§
Sourcefn kind_of(&self, _h: &Hash) -> Option<ObjectType>
fn kind_of(&self, _h: &Hash) -> Option<ObjectType>
The stored object’s type byte, when the sink can answer (used only to disambiguate blob vs chunked-manifest tag targets).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".