pub struct ObjectId(/* private fields */);Expand description
Content-addressed identifier for a stored Claw object.
Implementations§
Source§impl ObjectId
impl ObjectId
Sourcepub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_bytes(bytes: [u8; 32]) -> Self
Construct an object ID from raw 32-byte hash output.
Sourcepub fn from_hex(s: &str) -> Result<Self, CoreError>
pub fn from_hex(s: &str) -> Result<Self, CoreError>
Parse a lowercase or uppercase hexadecimal object ID.
Sourcepub fn from_display(s: &str) -> Result<Self, CoreError>
pub fn from_display(s: &str) -> Result<Self, CoreError>
Parse the human-facing clw_ base32 display form.
Sourcepub fn shard_prefix(&self) -> String
pub fn shard_prefix(&self) -> String
First 2 hex chars used for loose object directory sharding
Sourcepub fn shard_suffix(&self) -> String
pub fn shard_suffix(&self) -> String
Remaining hex chars for the loose object filename
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ObjectId
impl<'de> Deserialize<'de> for ObjectId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for ObjectId
impl Eq for ObjectId
impl StructuralPartialEq for ObjectId
Auto Trait Implementations§
impl Freeze for ObjectId
impl RefUnwindSafe for ObjectId
impl Send for ObjectId
impl Sync for ObjectId
impl Unpin for ObjectId
impl UnsafeUnpin for ObjectId
impl UnwindSafe for ObjectId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more