Skip to main content

LogAgent

Trait LogAgent 

Source
pub trait LogAgent {
    type Item;

    // Required methods
    fn new() -> Self;
    fn create_log(item: Self::Item) -> Self;
    fn append_log(&mut self, item: Self::Item);
}
Expand description

Log agent.

Required Associated Types§

Required Methods§

Source

fn new() -> Self

Source

fn create_log(item: Self::Item) -> Self

Source

fn append_log(&mut self, item: Self::Item)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl LogAgent for String

Source§

type Item = String

Source§

fn new() -> Self

Source§

fn create_log(item: String) -> Self

Source§

fn append_log(&mut self, item: String)

Source§

impl<T> LogAgent for PhantomData<T>

Source§

type Item = T

Source§

fn new() -> Self

Source§

fn create_log(_item: T) -> Self

Source§

fn append_log(&mut self, _item: T)

Source§

impl<T> LogAgent for Vec<T>

Source§

type Item = T

Source§

fn new() -> Self

Source§

fn create_log(item: T) -> Self

Source§

fn append_log(&mut self, item: T)

Implementors§

Source§

impl<Agent> LogAgent for Env<Agent>
where Agent: LogAgent,

Source§

type Item = <Agent as LogAgent>::Item