[][src]Struct log4rs::file::Deserializers

pub struct Deserializers(_);

A container of Deserializers.

Methods

impl Deserializers[src]

pub fn new() -> Deserializers[src]

Creates a Deserializers with default mappings.

All are enabled by default.

  • Appenders
    • "console" -> ConsoleAppenderDeserializer
      • Requires the console_appender feature.
    • "file" -> FileAppenderDeserializer
      • Requires the file_appender feature.
    • "rolling_file" -> RollingFileAppenderDeserializer
      • Requires the rolling_file_appender feature.
  • Encoders
    • "pattern" -> PatternEncoderDeserializer
      • Requires the pattern_encoder feature.
    • "json" -> JsonEncoderDeserializer
      • Requires the json_encoder feature.
  • Filters
    • "threshold" -> ThresholdFilterDeserializer
      • Requires the threshold_filter feature.
  • Policies
    • "compound" -> CompoundPolicyDeserializer
      • Requires the compound_policy feature.
  • Rollers
    • "delete" -> DeleteRollerDeserializer
      • Requires the delete_roller feature.
    • "fixed_window" -> FixedWindowRollerDeserializer
      • Requires the fixed_window_roller feature.
  • Triggers
    • "size" -> SizeTriggerDeserializer
      • Requires the size_trigger feature.

pub fn empty() -> Deserializers[src]

Creates a new Deserializers with no mappings.

pub fn insert<T>(&mut self, kind: &str, deserializer: T) where
    T: Deserialize
[src]

Adds a mapping from the specified kind to a deserializer.

pub fn deserialize<T: ?Sized>(
    &self,
    kind: &str,
    config: Value
) -> Result<Box<T>, Box<dyn Error + Sync + Send>> where
    T: Deserializable
[src]

Deserializes a value of a specific type and kind.

Trait Implementations

impl Clone for Deserializers[src]

impl Default for Deserializers[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any