Struct spacetimedb::Identity
source · pub struct Identity { /* private fields */ }
Implementations§
source§impl Identity
impl Identity
pub const ZERO: 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
.
pub fn get_type() -> AlgebraicType
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
fn as_prometheus_str(&self) -> impl AsRef<str>
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<'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 From<Identity> for AlgebraicValue
impl From<Identity> for AlgebraicValue
source§fn from(value: Identity) -> AlgebraicValue
fn from(value: Identity) -> AlgebraicValue
Converts to this type from the input type.
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
self
in the data format of S
using the provided serializer
.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 this value into the given Serde serializer. Read more
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 StructuralPartialEq for Identity
Auto Trait Implementations§
impl Freeze for Identity
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§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
.