pub enum Redaction {
    Static(Content),
    Dynamic(Box<dyn Fn(Content, ContentPath<'_>) -> Content + Sync + Send>),
}
Expand description

Replaces a value with another one. Represents a redaction.

Variants§

§

Static(Content)

Static redaction with new content.

§

Dynamic(Box<dyn Fn(Content, ContentPath<'_>) -> Content + Sync + Send>)

Redaction with new content.

Trait Implementations§

source§

impl<'a> From<&'a [u8]> for Redaction

source§

fn from(value: &'a [u8]) -> Redaction

Converts to this type from the input type.
source§

impl<'a> From<&'a str> for Redaction

source§

fn from(value: &'a str) -> Redaction

Converts to this type from the input type.
source§

impl From<()> for Redaction

source§

fn from(value: ()) -> Redaction

Converts to this type from the input type.
source§

impl From<String> for Redaction

source§

fn from(value: String) -> Redaction

Converts to this type from the input type.
source§

impl From<Vec<u8>> for Redaction

source§

fn from(value: Vec<u8>) -> Redaction

Converts to this type from the input type.
source§

impl From<bool> for Redaction

source§

fn from(value: bool) -> Redaction

Converts to this type from the input type.
source§

impl From<char> for Redaction

source§

fn from(value: char) -> Redaction

Converts to this type from the input type.
source§

impl From<f32> for Redaction

source§

fn from(value: f32) -> Redaction

Converts to this type from the input type.
source§

impl From<f64> for Redaction

source§

fn from(value: f64) -> Redaction

Converts to this type from the input type.
source§

impl From<i16> for Redaction

source§

fn from(value: i16) -> Redaction

Converts to this type from the input type.
source§

impl From<i32> for Redaction

source§

fn from(value: i32) -> Redaction

Converts to this type from the input type.
source§

impl From<i64> for Redaction

source§

fn from(value: i64) -> Redaction

Converts to this type from the input type.
source§

impl From<i8> for Redaction

source§

fn from(value: i8) -> Redaction

Converts to this type from the input type.
source§

impl From<u16> for Redaction

source§

fn from(value: u16) -> Redaction

Converts to this type from the input type.
source§

impl From<u32> for Redaction

source§

fn from(value: u32) -> Redaction

Converts to this type from the input type.
source§

impl From<u64> for Redaction

source§

fn from(value: u64) -> Redaction

Converts to this type from the input type.
source§

impl From<u8> for Redaction

source§

fn from(value: u8) -> Redaction

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.