#[non_exhaustive]pub enum DirectiveValue {
SourceList(SourceList),
AncestorSourceList(SourceList),
Sandbox(Vec<String>),
Boolean,
Token(Option<String>),
TokenList(Vec<String>),
TrustedTypes(Vec<String>),
Unknown,
}Expand description
A directive’s value, interpreted according to its registered
ValueGrammar (or DirectiveValue::Unknown if the directive
name isn’t in the registry).
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.
SourceList(SourceList)
AncestorSourceList(SourceList)
Sandbox(Vec<String>)
Boolean
Token(Option<String>)
See ValueGrammar::Token.
TokenList(Vec<String>)
TrustedTypes(Vec<String>)
Unknown
The directive name isn’t in the registry (see this module’s docs for what that does and doesn’t imply).
Trait Implementations§
Source§impl Clone for DirectiveValue
impl Clone for DirectiveValue
Source§fn clone(&self) -> DirectiveValue
fn clone(&self) -> DirectiveValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DirectiveValue
impl Debug for DirectiveValue
impl Eq for DirectiveValue
Source§impl PartialEq for DirectiveValue
impl PartialEq for DirectiveValue
impl StructuralPartialEq for DirectiveValue
Auto Trait Implementations§
impl Freeze for DirectiveValue
impl RefUnwindSafe for DirectiveValue
impl Send for DirectiveValue
impl Sync for DirectiveValue
impl Unpin for DirectiveValue
impl UnsafeUnpin for DirectiveValue
impl UnwindSafe for DirectiveValue
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