pub struct StateId(/* private fields */);Expand description
Content-addressed identity of an immutable state core.
Implementations§
Source§impl StateId
impl StateId
pub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_content_hash(hash: ContentHash) -> Self
pub fn try_from_slice(bytes: &[u8]) -> Result<Self, StateIdParseError>
pub fn as_bytes(&self) -> &[u8; 32]
pub fn as_content_hash(&self) -> ContentHash
pub fn to_string_full(&self) -> String
pub fn short(&self) -> String
pub fn parse(s: &str) -> Result<Self, StateIdParseError>
pub fn is_zero(&self) -> bool
Trait Implementations§
impl Copy for StateId
Source§impl<'de> Deserialize<'de> for StateId
impl<'de> Deserialize<'de> for StateId
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 Eq for StateId
Source§impl Ord for StateId
impl Ord for StateId
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
Source§impl PartialOrd for StateId
impl PartialOrd for StateId
impl StructuralPartialEq for StateId
Auto Trait Implementations§
impl Freeze for StateId
impl RefUnwindSafe for StateId
impl Send for StateId
impl Sync for StateId
impl Unpin for StateId
impl UnsafeUnpin for StateId
impl UnwindSafe for StateId
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