Skip to main content

Invite

Enum Invite 

Source
pub(crate) enum Invite<'a> {
    File(&'a str),
    Pair(String, String),
}
Expand description

Where the credential that redeems an invite came from.

Two shapes because there are two readers. An agent is handed a file by whatever provisioned it; a person is handed a link in a chat window, and the link is the credential — writing it to a file first so this could read it back would be asking them to do by hand the one step this command exists to remove.

Variants§

§

File(&'a str)

A file holding one <id>:<secret> line.

§

Pair(String, String)

The two halves, lifted straight out of a join link.

Auto Trait Implementations§

§

impl<'a> Freeze for Invite<'a>

§

impl<'a> RefUnwindSafe for Invite<'a>

§

impl<'a> Send for Invite<'a>

§

impl<'a> Sync for Invite<'a>

§

impl<'a> Unpin for Invite<'a>

§

impl<'a> UnsafeUnpin for Invite<'a>

§

impl<'a> UnwindSafe for Invite<'a>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.