pub struct TurnCredentials(/* private fields */);Expand description
Every live turn credential, by its digest. Cloning it is another handle onto the same registry.
Implementations§
Source§impl TurnCredentials
impl TurnCredentials
Sourcepub fn new(server: Option<SocketAddr>) -> Self
pub fn new(server: Option<SocketAddr>) -> Self
An empty registry whose turns’ runs are told the server is at server.
Sourcepub fn admit(&self, presented: &[u8]) -> Option<TurnBinding>
pub fn admit(&self, presented: &[u8]) -> Option<TurnBinding>
Who a presented credential authenticates as, when it is a live turn’s.
Sourcepub fn note_look(&self, binding: &TurnBinding)
pub fn note_look(&self, binding: &TurnBinding)
Note that the turn binding belongs to has taken a look at its print.
Sourcepub fn has_looked(&self, binding: &TurnBinding) -> bool
pub fn has_looked(&self, binding: &TurnBinding) -> bool
Whether the turn binding belongs to has taken a look at its print.
Trait Implementations§
Source§impl Clone for TurnCredentials
impl Clone for TurnCredentials
Source§impl Debug for TurnCredentials
impl Debug for TurnCredentials
Source§impl TurnAuthority for TurnCredentials
impl TurnAuthority for TurnCredentials
Auto Trait Implementations§
impl Forget for TurnCredentials
impl Freeze for TurnCredentials
impl Move for TurnCredentials
impl RefUnwindSafe for TurnCredentialswhere
Atomic<usize>: RefUnwindSafe,
Mutex<HashMap<[u8; 32], Held>>: RefUnwindSafe,
Mutex<HashSet<u64>>: RefUnwindSafe,
Atomic<u64>: RefUnwindSafe,
impl Send for TurnCredentials
impl Sync for TurnCredentials
impl Unpin for TurnCredentials
impl UnsafeUnpin for TurnCredentialswhere
*const ArcInner<Registry> is !null: UnsafeUnpin,
PhantomData<ArcInner<Registry>>: UnsafeUnpin,
impl UnwindSafe for TurnCredentialswhere
Arc<Registry>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.