#[non_exhaustive]pub enum Rejected {
OtherUser,
Unreported,
NoExpectedProcess,
OtherProcess {
expected: ProcessId,
observed: ProcessId,
},
NoPolicy,
Custom(Cow<'static, str>),
}Expand description
Why a policy refused a connection.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
OtherUser
The peer runs as another OS user.
Unreported
The platform reported no PID for the connection. Missing credentials are never a match.
NoExpectedProcess
The policy had no expected process to compare with, for example because the record naming it is missing.
OtherProcess
The connection belongs to another process.
Fields
NoPolicy
The policy has no rules, so it accepts nobody.
Custom(Cow<'static, str>)
A consumer’s own policy refused the peer, for the reason given.
Trait Implementations§
impl Eq for Rejected
Source§impl Error for Rejected
impl Error for Rejected
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for Rejected
Auto Trait Implementations§
impl Freeze for Rejected
impl RefUnwindSafe for Rejected
impl Send for Rejected
impl Sync for Rejected
impl Unpin for Rejected
impl UnsafeUnpin for Rejected
impl UnwindSafe for Rejected
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