LogFuncTrait

Trait LogFuncTrait 

Source
pub trait LogFuncTrait<T>:
    Fn(T) -> String
    + Send
    + Sync
where T: ToString,
{ }
Expand description

Trait for log formatting functions.

Defines the interface for functions that format log data. Implemented automatically for any compatible Fn(T) -> String.

§Generic Parameters

  • T: ToString - The type of data to be formatted, must be convertible to String.

Implementors§

Source§

impl<F, T> LogFuncTrait<T> for F
where F: Fn(T) -> String + Send + Sync, T: ToString,

Blanket implementation for any function matching LogFuncTrait signature.

This allows any compatible closure or function to be used as a log formatter.