Struct Core

Source
pub struct Core<W> { /* private fields */ }

Implementations§

Source§

impl Core<Stdout>

Source

pub fn new() -> Self

Source§

impl<W> Core<W>
where W: Write,

Source

pub fn input<K: ToString>(_: &Self, name: K) -> Result<String, VarError>

Source

pub fn set_output<K: ToString, V: ToString>(&mut self, k: K, v: V) -> Result<()>

Source

pub fn set_env<K: ToString, V: ToString>(&mut self, k: K, v: V) -> Result<()>

Source

pub fn add_mask<V: ToString>(&mut self, v: V) -> Result<()>

Source

pub fn add_path<P: ToString>(&mut self, v: P) -> Result<()>

Source

pub fn save_state<K: ToString, V: ToString>(&mut self, k: K, v: V) -> Result<()>

Source

pub fn state<K: ToString>(_: &Self, name: K) -> Result<String, VarError>

Source

pub fn stop_logging<F, T>(&mut self, f: F) -> Result<T>
where F: FnOnce() -> T,

Source

pub fn is_debug(_: &Self) -> bool

Source

pub fn log_message<M: ToString>( &mut self, level: LogLevel, message: M, ) -> Result<()>

Source

pub fn debug<M: ToString>(&mut self, message: M) -> Result<()>

Source

pub fn error<M: ToString>(&mut self, message: M) -> Result<()>

Source

pub fn warning<M: ToString>(&mut self, message: M) -> Result<()>

Source

pub fn log<M: ToString>( &mut self, level: LogLevel, log: Log<'_, M>, ) -> Result<()>

Source

pub fn log_debug<M: ToString>(&mut self, log: Log<'_, M>) -> Result<()>

Source

pub fn log_error<M: ToString>(&mut self, log: Log<'_, M>) -> Result<()>

Source

pub fn log_warning<M: ToString>(&mut self, log: Log<'_, M>) -> Result<()>

Trait Implementations§

Source§

impl Default for Core<Stdout>

Source§

fn default() -> Self

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

impl<W: Write> From<W> for Core<W>

Source§

fn from(out: W) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<W> Freeze for Core<W>
where W: Freeze,

§

impl<W> RefUnwindSafe for Core<W>
where W: RefUnwindSafe,

§

impl<W> Send for Core<W>
where W: Send,

§

impl<W> Sync for Core<W>
where W: Sync,

§

impl<W> Unpin for Core<W>
where W: Unpin,

§

impl<W> UnwindSafe for Core<W>
where W: UnwindSafe,

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