pub struct FederationId { /* private fields */ }Expand description
A FederationId is a globally unique identifier for an actor in the context
of polyproto.
Implementations§
Source§impl FederationId
impl FederationId
Sourcepub fn new(id: &str) -> Result<Self, ConstraintError>
pub fn new(id: &str) -> Result<Self, ConstraintError>
Validates input, then creates a new FederationId.
§Errors
This method returns a ConstraintError if the provided ID does not match the polyproto federation ID format.
§Panics
This method will panic if the internal regular expression for federation IDs fails to compile.
Trait Implementations§
Source§impl Clone for FederationId
impl Clone for FederationId
Source§fn clone(&self) -> FederationId
fn clone(&self) -> FederationId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FederationId
impl Debug for FederationId
Source§impl<'de> Deserialize<'de> for FederationId
impl<'de> Deserialize<'de> for FederationId
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 Display for FederationId
impl Display for FederationId
impl Eq for FederationId
Source§impl From<FederationId> for DirectoryString
impl From<FederationId> for DirectoryString
Source§fn from(value: FederationId) -> Self
fn from(value: FederationId) -> Self
Converts to this type from the input type.
Source§impl FromStr for FederationId
impl FromStr for FederationId
Source§impl Hash for FederationId
impl Hash for FederationId
Source§impl Ord for FederationId
impl Ord for FederationId
Source§fn cmp(&self, other: &FederationId) -> Ordering
fn cmp(&self, other: &FederationId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FederationId
impl PartialEq for FederationId
Source§fn eq(&self, other: &FederationId) -> bool
fn eq(&self, other: &FederationId) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for FederationId
impl PartialOrd for FederationId
Source§impl Serialize for FederationId
impl Serialize for FederationId
impl StructuralPartialEq for FederationId
Source§impl TryFrom<AttributeTypeAndValue> for FederationId
impl TryFrom<AttributeTypeAndValue> for FederationId
Source§type Error = ConstraintError
type Error = ConstraintError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for FederationId
impl RefUnwindSafe for FederationId
impl Send for FederationId
impl Sync for FederationId
impl Unpin for FederationId
impl UnsafeUnpin for FederationId
impl UnwindSafe for FederationId
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