Struct log4rs::config::Deserializers
source · pub struct Deserializers(/* private fields */);
Expand description
A container of Deserialize
rs.
Implementations§
source§impl Deserializers
impl Deserializers
sourcepub fn new() -> Deserializers
pub fn new() -> Deserializers
Creates a Deserializers
with default mappings.
All are enabled by default.
- Appenders
- “console” ->
ConsoleAppenderDeserializer
- Requires the
console_appender
feature.
- Requires the
- “file” ->
FileAppenderDeserializer
- Requires the
file_appender
feature.
- Requires the
- “rolling_file” ->
RollingFileAppenderDeserializer
- Requires the
rolling_file_appender
feature.
- Requires the
- “console” ->
- Encoders
- “pattern” ->
PatternEncoderDeserializer
- Requires the
pattern_encoder
feature.
- Requires the
- “json” ->
JsonEncoderDeserializer
- Requires the
json_encoder
feature.
- Requires the
- “pattern” ->
- Filters
- “threshold” ->
ThresholdFilterDeserializer
- Requires the
threshold_filter
feature.
- Requires the
- “threshold” ->
- Policies
- “compound” ->
CompoundPolicyDeserializer
- Requires the
compound_policy
feature.
- Requires the
- “compound” ->
- Rollers
- “delete” ->
DeleteRollerDeserializer
- Requires the
delete_roller
feature.
- Requires the
- “fixed_window” ->
FixedWindowRollerDeserializer
- Requires the
fixed_window_roller
feature.
- Requires the
- “delete” ->
- Triggers
- “size” ->
SizeTriggerDeserializer
- Requires the
size_trigger
feature.
- Requires the
- “time” ->
TimeTriggerDeserializer
- Requires the
time_trigger
feature.
- Requires the
- “size” ->
sourcepub fn empty() -> Deserializers
pub fn empty() -> Deserializers
Creates a new Deserializers
with no mappings.
sourcepub fn insert<T>(&mut self, kind: &str, deserializer: T)where
T: Deserialize,
pub fn insert<T>(&mut self, kind: &str, deserializer: T)where
T: Deserialize,
Adds a mapping from the specified kind
to a deserializer.
sourcepub fn deserialize<T>(&self, kind: &str, config: Value) -> Result<Box<T>>where
T: Deserializable + ?Sized,
pub fn deserialize<T>(&self, kind: &str, config: Value) -> Result<Box<T>>where
T: Deserializable + ?Sized,
Deserializes a value of a specific type and kind.
Trait Implementations§
source§impl Clone for Deserializers
impl Clone for Deserializers
source§fn clone(&self) -> Deserializers
fn clone(&self) -> Deserializers
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for Deserializers
impl Default for Deserializers
source§fn default() -> Deserializers
fn default() -> Deserializers
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for Deserializers
impl Send for Deserializers
impl Sync for Deserializers
impl Unpin for Deserializers
impl !UnwindSafe for Deserializers
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