#[non_exhaustive]pub enum SourceExpression {
Scheme(String),
Host(HostSource),
Keyword(Keyword),
Nonce(String),
Hash(HashExpression),
}Expand description
One recognized source-expression alternative (CSP3 §2.3.1).
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.
Scheme(String)
A scheme-source (e.g. https:), without the trailing :.
Host(HostSource)
A host-source.
Keyword(Keyword)
A keyword-source (e.g. 'self').
Nonce(String)
The base64-value from a 'nonce-...' token, without the
'nonce-/' wrapper.
Hash(HashExpression)
A hash-source (e.g. 'sha256-...').
Trait Implementations§
Source§impl Clone for SourceExpression
impl Clone for SourceExpression
Source§fn clone(&self) -> SourceExpression
fn clone(&self) -> SourceExpression
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 SourceExpression
impl Debug for SourceExpression
impl Eq for SourceExpression
Source§impl PartialEq for SourceExpression
impl PartialEq for SourceExpression
impl StructuralPartialEq for SourceExpression
Auto Trait Implementations§
impl Freeze for SourceExpression
impl RefUnwindSafe for SourceExpression
impl Send for SourceExpression
impl Sync for SourceExpression
impl Unpin for SourceExpression
impl UnsafeUnpin for SourceExpression
impl UnwindSafe for SourceExpression
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