pub struct Oid(/* private fields */);Expand description
A SHA-256 object identifier.
Stored as the raw 32 bytes; rendered as 64 lowercase hex characters by
fmt::Display. Construction via Oid::from_hex enforces the spec’s
strict-lowercase, exactly-64-hex-character format.
Implementations§
Source§impl Oid
impl Oid
Sourcepub const EMPTY: Oid
pub const EMPTY: Oid
SHA-256 of the empty input. The OID of the empty pointer.
Sourcepub const fn from_bytes(bytes: [u8; 32]) -> Self
pub const fn from_bytes(bytes: [u8; 32]) -> Self
Construct an OID from raw 32 hash bytes (e.g. the output of a streaming SHA-256 hasher).
Sourcepub fn from_hex(s: &str) -> Result<Self, OidParseError>
pub fn from_hex(s: &str) -> Result<Self, OidParseError>
Parse an OID from its 64-character lowercase hex form.
Trait Implementations§
Source§impl Ord for Oid
impl Ord for Oid
Source§impl PartialOrd for Oid
impl PartialOrd for Oid
impl Copy for Oid
impl Eq for Oid
impl StructuralPartialEq for Oid
Auto Trait Implementations§
impl Freeze for Oid
impl RefUnwindSafe for Oid
impl Send for Oid
impl Sync for Oid
impl Unpin for Oid
impl UnsafeUnpin for Oid
impl UnwindSafe for Oid
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