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§
source§impl Debug for AllowedEnumVariants
impl Debug for AllowedEnumVariants
source§impl PartialEq for AllowedEnumVariants
impl PartialEq for AllowedEnumVariants
source§fn eq(&self, other: &AllowedEnumVariants) -> bool
fn eq(&self, other: &AllowedEnumVariants) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for AllowedEnumVariants
impl StructuralPartialEq for AllowedEnumVariants
Auto Trait Implementations§
impl Freeze for AllowedEnumVariants
impl RefUnwindSafe for AllowedEnumVariants
impl Send for AllowedEnumVariants
impl Sync for AllowedEnumVariants
impl Unpin for AllowedEnumVariants
impl UnwindSafe for AllowedEnumVariants
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