Struct spacetimedb::address::Address
source · pub struct Address { /* private fields */ }Expand description
This is the address for a SpacetimeDB database or client connection.
It is a unique identifier for a particular database and once set for a database, does not change.
Implementations§
source§impl Address
impl Address
pub const ZERO: Address = _
pub fn get_type() -> AlgebraicType
pub fn from_arr(arr: &[u8; 16]) -> Address
pub const fn zero() -> Address
pub fn from_u128(u: u128) -> Address
pub fn from_hex(hex: &str) -> Result<Address, Error>
pub fn to_hex(self) -> HexString<16>
pub fn abbreviate(&self) -> [u8; 8]
pub fn to_abbreviated_hex(self) -> HexString<8>
pub fn from_slice(slice: impl AsRef<[u8]>) -> Address
pub fn as_slice(&self) -> &[u8; 16]
pub fn to_ipv6(self) -> Ipv6Addr
pub fn to_ipv6_string(self) -> String
pub fn to_u128(&self) -> u128
Trait Implementations§
source§impl AsPrometheusLabel for Address
impl AsPrometheusLabel for Address
fn as_prometheus_str(&self) -> impl AsRef<str>
source§impl<'de> Deserialize<'de> for Address
impl<'de> Deserialize<'de> for Address
source§fn deserialize<D>(
deserializer: D
) -> Result<Address, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Address, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given
deserializer.source§impl<'de> Deserialize<'de> for Address
impl<'de> Deserialize<'de> for Address
source§fn deserialize<D>(
deserializer: D
) -> Result<Address, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Address, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Address> for AlgebraicValue
impl From<Address> for AlgebraicValue
source§fn from(value: Address) -> AlgebraicValue
fn from(value: Address) -> AlgebraicValue
Converts to this type from the input type.
source§impl From<AddressForUrl> for Address
impl From<AddressForUrl> for Address
source§fn from(addr: AddressForUrl) -> Address
fn from(addr: AddressForUrl) -> Address
Converts to this type from the input type.
source§impl Ord for Address
impl Ord for Address
source§impl PartialEq for Address
impl PartialEq for Address
source§impl PartialOrd for Address
impl PartialOrd for Address
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 Address
impl Serialize for Address
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 Address
impl Serialize for Address
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 Address
impl SpacetimeType for Address
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 Address
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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.