Struct spacetimedb_lib::identity::Identity
source · pub struct Identity { /* private fields */ }Implementations§
source§impl Identity
impl Identity
sourcepub fn from_byte_array(bytes: [u8; 32]) -> Self
pub fn from_byte_array(bytes: [u8; 32]) -> Self
Returns an Identity defined as the given bytes byte array.
sourcepub fn from_slice(slice: &[u8]) -> Self
pub fn from_slice(slice: &[u8]) -> Self
Returns an Identity defined as the given byte slice.
sourcepub fn as_bytes(&self) -> &[u8; 32]
pub fn as_bytes(&self) -> &[u8; 32]
Returns a borrowed view of the byte array defining this Identity.
pub fn to_vec(&self) -> Vec<u8>
pub fn to_hex(&self) -> String
pub fn to_abbreviated_hex(&self) -> String
pub fn from_hex(hex: impl AsRef<[u8]>) -> Result<Self, FromHexError>
pub fn from_hashing_bytes(bytes: impl AsRef<[u8]>) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Identity
impl<'de> Deserialize<'de> for Identity
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given
deserializer.source§impl<'de> Deserialize<'de> for Identity
impl<'de> Deserialize<'de> for Identity
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Identity
impl Ord for Identity
source§impl PartialEq for Identity
impl PartialEq for Identity
source§impl PartialOrd for Identity
impl PartialOrd for Identity
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl SpacetimeType for Identity
impl SpacetimeType for Identity
source§fn make_type<S: TypespaceBuilder>(_ts: &mut S) -> AlgebraicType
fn make_type<S: TypespaceBuilder>(_ts: &mut S) -> AlgebraicType
Returns an
AlgebraicType representing the type for Self in SATS
and in the typing context in typespace.impl Copy for Identity
impl Eq for Identity
impl StructuralEq for Identity
impl StructuralPartialEq for Identity
Auto Trait Implementations§
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnwindSafe for Identity
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Satn for T
impl<T> Satn for T
source§fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Formats the value using the SATN data format into the formatter
f.source§fn fmt_psql(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt_psql(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Formats the value using the postgres SATN data format into the formatter
f.source§fn to_satn(&self) -> String
fn to_satn(&self) -> String
Formats the value using the SATN data format into the returned
String.source§fn to_satn_pretty(&self) -> String
fn to_satn_pretty(&self) -> String
Pretty prints the value using the SATN data format into the returned
String.