Struct spacetimedb::Identity
source · pub struct Identity { /* private fields */ }Implementations§
source§impl Identity
impl Identity
sourcepub const fn from_byte_array(bytes: [u8; 32]) -> Identity
pub const fn from_byte_array(bytes: [u8; 32]) -> Identity
Returns an Identity defined as the given bytes byte array.
sourcepub fn from_slice(slice: &[u8]) -> Identity
pub fn from_slice(slice: &[u8]) -> Identity
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) -> HexString<32>
pub fn abbreviate(&self) -> &[u8; 8]
pub fn to_abbreviated_hex(&self) -> HexString<8>
pub fn from_hex(hex: impl AsRef<[u8]>) -> Result<Identity, FromHexError>
pub fn from_hashing_bytes(bytes: impl AsRef<[u8]>) -> Identity
Trait Implementations§
source§impl AsPrometheusLabel for Identity
impl AsPrometheusLabel for Identity
source§impl<'de> Deserialize<'de> for Identity
impl<'de> Deserialize<'de> for Identity
source§fn deserialize<D>(
deserializer: D
) -> Result<Identity, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Identity, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
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: D
) -> Result<Identity, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Identity, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
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 Serialize for Identity
impl Serialize for Identity
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl Serialize for Identity
impl Serialize for Identity
source§fn serialize<S>(
&self,
__serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
__serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize
self in the data format of S using the provided serializer.source§impl SpacetimeType for Identity
impl SpacetimeType for Identity
source§fn make_type<S>(_ts: &mut S) -> AlgebraicTypewhere
S: TypespaceBuilder,
fn make_type<S>(_ts: &mut S) -> AlgebraicTypewhere
S: TypespaceBuilder,
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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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>
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
§impl<T> Pointable for T
impl<T> Pointable for T
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.§impl<T> Upcastable for T
impl<T> Upcastable for T
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref
§fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
upcast boxed dyn