pub struct Lit<T: AsRef<str>>(pub T);Expand description
A PostgreSQL string literal wrapper.
Display writes the value escaped and quoted with single quotes.
§Example
use dibs_sql::Lit;
assert_eq!(format!("{}", Lit("foo")), "'foo'");
assert_eq!(format!("{}", Lit("it's")), "'it''s'");Tuple Fields§
§0: TTrait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Lit<T>where
T: Freeze,
impl<T> RefUnwindSafe for Lit<T>where
T: RefUnwindSafe,
impl<T> Send for Lit<T>where
T: Send,
impl<T> Sync for Lit<T>where
T: Sync,
impl<T> Unpin for Lit<T>where
T: Unpin,
impl<T> UnsafeUnpin for Lit<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Lit<T>where
T: 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