Struct spacetimedb_lib::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: Self = _
pub fn get_type() -> AlgebraicType
pub fn from_arr(arr: &[u8; 16]) -> Self
pub const fn zero() -> Self
pub fn from_u128(u: u128) -> Self
pub fn from_hex(hex: &str) -> Result<Self, 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]>) -> Self
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<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
source§impl<'de> Deserialize<'de> for Address
impl<'de> Deserialize<'de> for Address
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 From<Address> for AddressForUrl
impl From<Address> for AddressForUrl
source§impl From<Address> for AlgebraicValue
impl From<Address> for AlgebraicValue
source§impl From<AddressForUrl> for Address
impl From<AddressForUrl> for Address
source§fn from(addr: AddressForUrl) -> Self
fn from(addr: AddressForUrl) -> Self
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 SpacetimeType for Address
impl SpacetimeType for Address
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 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> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
.