InMemmoryLogStore

Struct InMemmoryLogStore 

Source
pub struct InMemmoryLogStore { /* private fields */ }

Implementations§

Trait Implementations§

Source§

impl Default for InMemmoryLogStore

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl LogStore for InMemmoryLogStore

Source§

fn add_log( &self, log_id: &str, log_source: Arc<Box<dyn LogSource + Send + Sync>>, format: Option<&String>, enabled: bool, )

Add a new log to the store
Source§

fn add_line(&self, log_id: &str, line: &str)

Add a single line to the given log id
Source§

fn add_lines(&self, log_id: &str, lines: &[String]) -> Range<usize>

Add a many lines to the given log id
Source§

fn get_lines(&self, log_id: &str) -> Vec<String>

Get a list of all the lines for the requested log. WARNING: clones
Source§

fn extract_lines(&self, log_id: &str) -> Vec<String>

Get a list of all the lines for the requested log. WARNING: moves
Source§

fn get_logs(&self) -> Vec<(bool, String, Option<String>)>

Get a list of (enabled, log_id, format(if any))
Source§

fn get_format(&self, log_id: &str) -> Option<String>

Get the format associated to the given log id
Source§

fn get_total_lines(&self) -> usize

Get the count of all the lines
Source§

fn get_source(&self, id: &str) -> Option<Arc<Box<dyn LogSource + Send + Sync>>>

Get the log source associated to the log id
Source§

fn toggle_log(&self, log_id: &str)

Change the enabled state of the given log

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

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>,

Source§

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.