pub struct VerbatimStrArg(pub String);Expand description
Wrapper for verbatim string literal arguments — preserves interpolation sigils.
Use VerbatimStrArg when your format string uses %V to emit a string with
minimal escaping (only structural delimiters escaped, interpolation preserved).
ⓘ
use sigil_stitch::code_block::{CodeBlock, VerbatimStrArg};
let mut cb = CodeBlock::builder();
cb.add_statement("echo %V", (VerbatimStrArg("$HOME/.config".to_string()),));
let block = cb.build().unwrap();Tuple Fields§
§0: StringTrait Implementations§
Source§impl From<VerbatimStrArg> for Arg
impl From<VerbatimStrArg> for Arg
Source§fn from(s: VerbatimStrArg) -> Self
fn from(s: VerbatimStrArg) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for VerbatimStrArg
impl RefUnwindSafe for VerbatimStrArg
impl Send for VerbatimStrArg
impl Sync for VerbatimStrArg
impl Unpin for VerbatimStrArg
impl UnsafeUnpin for VerbatimStrArg
impl UnwindSafe for VerbatimStrArg
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