Skip to main content

Uid

Struct Uid 

Source
pub struct Uid(/* private fields */);
Expand description

A globally unique identifier.

This type is used by both JSCalendar (RFC 8984 §4.1.1) and iCalendar (RFC 5545 §3.8.4.7). The value is an arbitrary non-empty string with no particular format required. Uniqueness is a semantic property and is not enforced by this type.

Implementations§

Source§

impl Uid

Source

pub fn new(input: &str) -> Result<&Self, InvalidUidError>

Source§

impl Uid

Source

pub const fn as_str(&self) -> &str

Trait Implementations§

Source§

impl AsMut<Uid> for UidBuf

Source§

fn as_mut(&mut self) -> &mut Uid

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Uid> for UidBuf

Source§

fn as_ref(&self) -> &Uid

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<Uid> for UidBuf

Source§

fn borrow(&self) -> &Uid

Immutably borrows from an owned value. Read more
Source§

impl Clone for Box<Uid>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Uid

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for Uid

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<&Uid> for Box<Uid>

Source§

fn from(value: &Uid) -> Self

Converts to this type from the input type.
Source§

impl From<&Uid> for UidBuf

Source§

fn from(value: &Uid) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Uid> for Box<Uid>

Source§

fn from(value: &mut Uid) -> Self

Converts to this type from the input type.
Source§

impl From<&mut Uid> for UidBuf

Source§

fn from(value: &mut Uid) -> Self

Converts to this type from the input type.
Source§

impl From<UidBuf> for Box<Uid>

Source§

fn from(value: UidBuf) -> Self

Converts to this type from the input type.
Source§

impl Hash for Uid

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
Source§

impl Ord for Uid

Source§

fn cmp(&self, other: &Uid) -> Ordering

This method returns an Ordering between self and other. Read more
Source§

impl PartialEq for Uid

Source§

fn eq(&self, other: &Uid) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Uid

Source§

fn partial_cmp(&self, other: &Uid) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl ToOwned for Uid

Source§

type Owned = UidBuf

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl Eq for Uid

Source§

impl StructuralPartialEq for Uid

Auto Trait Implementations§

§

impl Freeze for Uid

§

impl RefUnwindSafe for Uid

§

impl Send for Uid

§

impl !Sized for Uid

§

impl Sync for Uid

§

impl Unpin for Uid

§

impl UnsafeUnpin for Uid

§

impl UnwindSafe for Uid

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more