pub struct ObjectId(/* private fields */);Expand description
A prikk object identifier: 64 lowercase hexadecimal characters (a SHA-256 digest in hex).
Validated on construction so a malformed string never travels the UI as if it were an identity.
Implementations§
Source§impl ObjectId
impl ObjectId
Sourcepub fn parse(value: &str) -> Result<Self>
pub fn parse(value: &str) -> Result<Self>
Parse a 64-character lowercase-hex object id, rejecting any other shape.
§Errors
Returns StikkError::Environment when the string is not exactly 64 lowercase hex
characters — a shape prikk would never emit, so encountering it means stikk misread prikk’s
output, which is an environment fault, not a user refusal.
Sourcepub fn abbreviated(&self, len: usize) -> &str
pub fn abbreviated(&self, len: usize) -> &str
A short prefix for display; the UI pairs this with full-copy on focus (FR-124). Returns the
whole id if it is somehow shorter than len (it never is after construction).
Trait Implementations§
impl Eq for ObjectId
Source§impl Ord for ObjectId
impl Ord for ObjectId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for ObjectId
impl PartialOrd for ObjectId
impl StructuralPartialEq for ObjectId
Auto Trait Implementations§
impl Forget for ObjectId
impl Freeze for ObjectId
impl Move 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