pub struct OperationContext { /* private fields */ }
Implementations§
Source§impl OperationContext
Auto-generated by derive_getters::Getters
.
impl OperationContext
Auto-generated by derive_getters::Getters
.
Source§impl OperationContext
impl OperationContext
pub fn new() -> Self
pub fn want<S: Into<String>>(target: S) -> Self
pub fn with_exit_log(self) -> Self
👎Deprecated: use with_auto_log
pub fn with_auto_log(self) -> Self
pub fn with_mod_path<S: Into<String>>(self, path: S) -> Self
pub fn with<S1: Into<String>, S2: Into<String>>(&mut self, key: S1, val: S2)
👎Deprecated: use record
pub fn with_path<S1: Into<String>, S2: Into<PathBuf>>( &mut self, key: S1, val: S2, )
👎Deprecated: use record
pub fn with_want<S: Into<String>>(&mut self, target: S)
pub fn mark_suc(&mut self)
pub fn mark_cancel(&mut self)
Sourcepub fn info<S: AsRef<str>>(&self, message: S)
pub fn info<S: AsRef<str>>(&self, message: S)
记录日志信息,在无错误情况下也可以提供有价值的上下文信息 注意:需要启用相应的日志特性才能使用这些方法
pub fn debug<S: AsRef<str>>(&self, message: S)
pub fn warn<S: AsRef<str>>(&self, message: S)
pub fn error<S: AsRef<str>>(&self, message: S)
pub fn trace<S: AsRef<str>>(&self, message: S)
Trait Implementations§
Source§impl Clone for OperationContext
impl Clone for OperationContext
Source§fn clone(&self) -> OperationContext
fn clone(&self) -> OperationContext
Returns a duplicate 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<S1> ContextRecord<S1, &Path> for OperationContext
impl<S1> ContextRecord<S1, &Path> for OperationContext
Source§impl<S1> ContextRecord<S1, &PathBuf> for OperationContext
impl<S1> ContextRecord<S1, &PathBuf> for OperationContext
Source§impl<S1> ContextRecord<S1, &str> for OperationContext
impl<S1> ContextRecord<S1, &str> for OperationContext
Source§impl<S1> ContextRecord<S1, String> for OperationContext
impl<S1> ContextRecord<S1, String> for OperationContext
Source§impl Debug for OperationContext
impl Debug for OperationContext
Source§impl Default for OperationContext
impl Default for OperationContext
Source§impl<'de> Deserialize<'de> for OperationContext
impl<'de> Deserialize<'de> for OperationContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for OperationContext
impl Display for OperationContext
Source§impl Drop for OperationContext
impl Drop for OperationContext
Source§impl From<&OperationContext> for OperationContext
impl From<&OperationContext> for OperationContext
Source§fn from(value: &OperationContext) -> Self
fn from(value: &OperationContext) -> Self
Converts to this type from the input type.
Source§impl From<&Path> for OperationContext
impl From<&Path> for OperationContext
Source§impl From<&PathBuf> for OperationContext
impl From<&PathBuf> for OperationContext
Source§impl From<&str> for OperationContext
impl From<&str> for OperationContext
Source§impl<V> From<(&str, V)> for OperationContext
impl<V> From<(&str, V)> for OperationContext
Source§impl From<String> for OperationContext
impl From<String> for OperationContext
Source§impl PartialEq for OperationContext
impl PartialEq for OperationContext
Source§impl Serialize for OperationContext
impl Serialize for OperationContext
impl StructuralPartialEq for OperationContext
Auto Trait Implementations§
impl Freeze for OperationContext
impl RefUnwindSafe for OperationContext
impl Send for OperationContext
impl Sync for OperationContext
impl Unpin for OperationContext
impl UnwindSafe for OperationContext
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