Enum amplify_syn::ListReq
source · 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
Fields
Only a single value allowed and it must be present
Many
Fields
Any number of any elements may be present
Predefined
Fields
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
Deny
Element must not be present
Implementations§
Trait Implementations§
Auto Trait Implementations§
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