pub struct Handle(/* private fields */);Expand description
A validated AT Protocol handle.
Handles are domain-name-like identifiers such as alice.bsky.social.
Implementations§
Source§impl Handle
impl Handle
Sourcepub fn new(s: &str) -> Result<Self, InvalidHandleError>
pub fn new(s: &str) -> Result<Self, InvalidHandleError>
Create a new Handle from a string, validating the format.
Sourcepub fn into_inner(self) -> String
pub fn into_inner(self) -> String
Consume and return the inner string.
Sourcepub fn is_invalid_handle(&self) -> bool
pub fn is_invalid_handle(&self) -> bool
Check if this is the canonical invalid handle.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Handle
impl<'de> Deserialize<'de> for Handle
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 Serde deserializer. Read more
Source§impl From<Handle> for AtIdentifier
impl From<Handle> for AtIdentifier
Source§impl Ord for Handle
impl Ord for Handle
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 PartialOrd for Handle
impl PartialOrd for Handle
impl Eq for Handle
impl StructuralPartialEq for Handle
Auto Trait Implementations§
impl Freeze for Handle
impl RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl UnsafeUnpin for Handle
impl UnwindSafe for Handle
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