pub enum ListReq<T> {
Single {
whitelist: Option<Vec<T>>,
default: Option<T>,
},
Many {
whitelist: Option<Vec<T>>,
required: bool,
max_no: Option<u8>,
},
Predefined {
whitelist: Option<Vec<T>>,
default: Vec<T>,
},
Deny,
}
Expand description
Requirements for list elements. For instance, used in AttrReq
for
providing crate::ParametrizedAttr
fields requirements.
Variants§
Single
Only a single value allowed and it must be present
Fields
Many
Any number of any elements may be present
Fields
Predefined
Any number of any elements may not be present; if none of the elements is present the list will use default vec of the values
Fields
Deny
Element must not be present
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ListReq<T>where
T: Freeze,
impl<T> RefUnwindSafe for ListReq<T>where
T: RefUnwindSafe,
impl<T> Send for ListReq<T>where
T: Send,
impl<T> Sync for ListReq<T>where
T: Sync,
impl<T> Unpin for ListReq<T>where
T: Unpin,
impl<T> UnwindSafe for ListReq<T>where
T: UnwindSafe,
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,
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.