[−][src]Struct q_debug::fmt::Formatter
Implementations
impl Formatter[src]
pub fn header(&self, now: &DateTime<Utc>, log_location: &LogLocation) -> String[src]
pub fn q(&self) -> String[src]
pub fn q_literal<T: Debug>(&self, val: &T) -> String[src]
Returns a log line for a literal value, val.
use q::fmt::Formatter; let fmt = Formatter {}; assert_eq!( fmt.q_literal(&String::from("Test message")), String::from("> \"Test message\"") ); assert_eq!( fmt.q_literal(&Some(42)), String::from("> Some(42)") );
pub fn q_expr<T: Debug>(&self, val: &T, expr: &str) -> String[src]
Returns a log line for an expression with string representation expr
and value val.
use q::fmt::Formatter; let fmt = Formatter {}; assert_eq!( fmt.q_expr(&3, &String::from("my_var")), String::from("> my_var = 3") ); assert_eq!( fmt.q_expr(&5, &String::from("2 + 3")), String::from("> 2 + 3 = 5") );
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Formatter
impl Send for Formatter
impl Sync for Formatter
impl Unpin for Formatter
impl UnwindSafe for Formatter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,