pub struct SQLBytes<'a>(pub Cow<'a, [u8]>);Expand description
Wrapper for byte slices to avoid list semantics (Vec<u8> normally becomes a list).
Use this when you want a single BLOB/bytea parameter:
ⓘ
use drizzle_core::{SQLBytes, SQL};
let data = vec![1u8, 2, 3];
let sql = SQL::bytes(&data); // or SQL::param(SQLBytes::new(&data))Tuple Fields§
§0: Cow<'a, [u8]>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SQLBytes<'a>
impl<'a> RefUnwindSafe for SQLBytes<'a>
impl<'a> Send for SQLBytes<'a>
impl<'a> Sync for SQLBytes<'a>
impl<'a> Unpin for SQLBytes<'a>
impl<'a> UnwindSafe for SQLBytes<'a>
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