Enum bincode::error::AllowedEnumVariants
source · [−]#[non_exhaustive]
pub enum AllowedEnumVariants {
Range {
min: u32,
max: u32,
},
Allowed(&'static [u32]),
}
Expand description
Indicates which enum variants are allowed
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.
Range
All values between min
and max
(inclusive) are allowed
Allowed(&'static [u32])
Each one of these values is allowed
Trait Implementations
sourceimpl Debug for AllowedEnumVariants
impl Debug for AllowedEnumVariants
sourceimpl PartialEq<AllowedEnumVariants> for AllowedEnumVariants
impl PartialEq<AllowedEnumVariants> for AllowedEnumVariants
sourcefn eq(&self, other: &AllowedEnumVariants) -> bool
fn eq(&self, other: &AllowedEnumVariants) -> bool
impl Eq for AllowedEnumVariants
impl StructuralEq for AllowedEnumVariants
impl StructuralPartialEq for AllowedEnumVariants
Auto Trait Implementations
impl RefUnwindSafe for AllowedEnumVariants
impl Send for AllowedEnumVariants
impl Sync for AllowedEnumVariants
impl Unpin for AllowedEnumVariants
impl UnwindSafe for AllowedEnumVariants
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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