pub struct Access { /* private fields */ }Expand description
Which peers may connect, and what each may do. Nobody is listed at first.
Implementations§
Source§impl Access
impl Access
pub fn new() -> Self
Sourcepub fn allow(&mut self, fingerprint: &str, policy: Policy) -> Result<()>
pub fn allow(&mut self, fingerprint: &str, policy: Policy) -> Result<()>
Let the holder of the certificate with this fingerprint connect,
under policy.
Sourcepub fn policy_for(&self, who: &PeerIdentity) -> Result<Policy>
pub fn policy_for(&self, who: &PeerIdentity) -> Result<Policy>
The policy for an authenticated peer, or the refusal.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Forget for Access
impl Freeze for Access
impl Move for Access
impl RefUnwindSafe for Access
impl Send for Access
impl Sync for Access
impl Unpin for Access
impl UnsafeUnpin for Access
impl UnwindSafe for Access
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more