Enum tor_netdoc::types::policy::PolicyError
source · [−]#[non_exhaustive]
pub enum PolicyError {
InvalidPort,
InvalidRange,
InvalidAddress,
MaskWithStar,
InvalidMask,
InvalidPolicy,
}
Expand description
Error from an unparsable or invalid policy.
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.
InvalidPort
A port was not a number in the range 1..65535
InvalidRange
A port range had its starting-point higher than its ending point.
InvalidAddress
An address could not be interpreted.
MaskWithStar
Tried to use a bitmask with the address “*”.
InvalidMask
A bit mask was out of range.
InvalidPolicy
A policy could not be parsed for some other reason.
Trait Implementations
sourceimpl Clone for PolicyError
impl Clone for PolicyError
sourcefn clone(&self) -> PolicyError
fn clone(&self) -> PolicyError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PolicyError
impl Debug for PolicyError
sourceimpl Display for PolicyError
impl Display for PolicyError
sourceimpl Error for PolicyError
impl Error for PolicyError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<PolicyError> for Error
impl From<PolicyError> for Error
sourcefn from(source: PolicyError) -> Error
fn from(source: PolicyError) -> Error
Converts to this type from the input type.
sourceimpl PartialEq<PolicyError> for PolicyError
impl PartialEq<PolicyError> for PolicyError
impl Eq for PolicyError
impl StructuralEq for PolicyError
impl StructuralPartialEq for PolicyError
Auto Trait Implementations
impl RefUnwindSafe for PolicyError
impl Send for PolicyError
impl Sync for PolicyError
impl Unpin for PolicyError
impl UnwindSafe for PolicyError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more