pub struct Literal<S: Into<String>>(pub S);Expand description
Write a literal token verbatim (numeric text a vendor supplied, or a value you don’t want reformatted).
§Examples
let mut h = Header::new();
h.set("BSCALE", Literal("1.000")).unwrap(); // kept as-is, not reformatted
assert_eq!(h.get::<String>("BSCALE").unwrap().as_deref(), Some("1.000"));Tuple Fields§
§0: STrait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Literal<S>where
S: Freeze,
impl<S> RefUnwindSafe for Literal<S>where
S: RefUnwindSafe,
impl<S> Send for Literal<S>where
S: Send,
impl<S> Sync for Literal<S>where
S: Sync,
impl<S> Unpin for Literal<S>where
S: Unpin,
impl<S> UnsafeUnpin for Literal<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Literal<S>where
S: UnwindSafe,
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