Struct fog_pack::validator::StreamIdValidator [−][src]
pub struct StreamIdValidator {
pub comment: String,
pub in_list: Vec<StreamId>,
pub nin_list: Vec<StreamId>,
pub query: bool,
}Expand description
Validator for a cryptographic StreamId.
This validator will only pass a StreamId value. Validation passes if:
- If the
inlist is not empty, the StreamId must be among the ones in the list. - The StreamId must not be among the ones in the
ninlist.
Defaults
Fields that aren’t specified for the validator use their defaults instead. The defaults for each field are:
- comment: “”
- in_list: empty
- nin_list: empty
- query: false
Fields
comment: StringAn optional comment explaining the validator.
in_list: Vec<StreamId>A vector of specific allowed values, stored under the in field. If empty, this vector is not checked against.
nin_list: Vec<StreamId>A vector of specific unallowed values, stored under the nin field.
query: boolIf true, queries against matching spots may have values in the in or nin lists.
Implementations
Set whether or not queries can use the in and nin lists.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for StreamIdValidator
impl Send for StreamIdValidator
impl Sync for StreamIdValidator
impl Unpin for StreamIdValidator
impl UnwindSafe for StreamIdValidator
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self