pub struct Output<'a, T, DB> where
DB: TypeMetadata,
DB::MetadataLookup: 'a, { /* private fields */ }
Expand description
Wraps a buffer to be written by ToSql
with additional backend specific
utilities.
Implementations
sourceimpl<'a, T, DB: TypeMetadata> Output<'a, T, DB>
impl<'a, T, DB: TypeMetadata> Output<'a, T, DB>
sourcepub fn new(out: T, metadata_lookup: &'a DB::MetadataLookup) -> Self
pub fn new(out: T, metadata_lookup: &'a DB::MetadataLookup) -> Self
Construct a new Output
sourcepub fn with_buffer<U>(&self, new_out: U) -> Output<'a, U, DB>ⓘNotable traits for Output<'a, T, DB>impl<'a, T: Write, DB: TypeMetadata> Write for Output<'a, T, DB>
pub fn with_buffer<U>(&self, new_out: U) -> Output<'a, U, DB>ⓘNotable traits for Output<'a, T, DB>impl<'a, T: Write, DB: TypeMetadata> Write for Output<'a, T, DB>
Create a new Output
with the given buffer
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Return the raw buffer this type is wrapping
sourcepub fn metadata_lookup(&self) -> &'a DB::MetadataLookup
pub fn metadata_lookup(&self) -> &'a DB::MetadataLookup
Returns the backend’s mechanism for dynamically looking up type metadata at runtime, if relevant for the given backend.
Trait Implementations
sourceimpl<'a, T: Clone, DB: Clone> Clone for Output<'a, T, DB> where
DB: TypeMetadata,
DB::MetadataLookup: 'a,
DB::MetadataLookup: Clone,
impl<'a, T: Clone, DB: Clone> Clone for Output<'a, T, DB> where
DB: TypeMetadata,
DB::MetadataLookup: 'a,
DB::MetadataLookup: Clone,
sourceimpl<'a, T, DB> Debug for Output<'a, T, DB> where
T: Debug,
DB: TypeMetadata,
impl<'a, T, DB> Debug for Output<'a, T, DB> where
T: Debug,
DB: TypeMetadata,
sourceimpl<'a, T, DB: TypeMetadata> Deref for Output<'a, T, DB>
impl<'a, T, DB: TypeMetadata> Deref for Output<'a, T, DB>
sourceimpl<'a, T, DB: TypeMetadata> DerefMut for Output<'a, T, DB>
impl<'a, T, DB: TypeMetadata> DerefMut for Output<'a, T, DB>
sourceimpl<'a, T, U, DB> PartialEq<U> for Output<'a, T, DB> where
DB: TypeMetadata,
T: PartialEq<U>,
impl<'a, T, U, DB> PartialEq<U> for Output<'a, T, DB> where
DB: TypeMetadata,
T: PartialEq<U>,
sourceimpl<'a, T: Write, DB: TypeMetadata> Write for Output<'a, T, DB>
impl<'a, T: Write, DB: TypeMetadata> Write for Output<'a, T, DB>
sourcefn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
sourcefn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
sourcefn write_all(&mut self, buf: &[u8]) -> Result<()>
fn write_all(&mut self, buf: &[u8]) -> Result<()>
Attempts to write an entire buffer into this writer. Read more
sourcefn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()>
fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<()>
Writes a formatted string into this writer, returning any error encountered. Read more
sourcefn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
impl<'a, T: Copy, DB: Copy> Copy for Output<'a, T, DB> where
DB: TypeMetadata,
DB::MetadataLookup: 'a,
DB::MetadataLookup: Copy,
Auto Trait Implementations
impl<'a, T, DB> RefUnwindSafe for Output<'a, T, DB> where
T: RefUnwindSafe,
<DB as TypeMetadata>::MetadataLookup: RefUnwindSafe,
impl<'a, T, DB> Send for Output<'a, T, DB> where
T: Send,
<DB as TypeMetadata>::MetadataLookup: Sync,
impl<'a, T, DB> Sync for Output<'a, T, DB> where
T: Sync,
<DB as TypeMetadata>::MetadataLookup: Sync,
impl<'a, T, DB> Unpin for Output<'a, T, DB> where
T: Unpin,
impl<'a, T, DB> UnwindSafe for Output<'a, T, DB> where
T: UnwindSafe,
<DB as TypeMetadata>::MetadataLookup: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoSql for T
impl<T> IntoSql for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<W> WriteBytesExt for W where
W: Write + ?Sized,
impl<W> WriteBytesExt for W where
W: Write + ?Sized,
sourcefn write_u8(&mut self, n: u8) -> Result<(), Error>
fn write_u8(&mut self, n: u8) -> Result<(), Error>
Writes an unsigned 8 bit integer to the underlying writer. Read more
sourcefn write_i8(&mut self, n: i8) -> Result<(), Error>
fn write_i8(&mut self, n: i8) -> Result<(), Error>
Writes a signed 8 bit integer to the underlying writer. Read more
sourcefn write_u16<T>(&mut self, n: u16) -> Result<(), Error> where
T: ByteOrder,
fn write_u16<T>(&mut self, n: u16) -> Result<(), Error> where
T: ByteOrder,
Writes an unsigned 16 bit integer to the underlying writer. Read more
sourcefn write_i16<T>(&mut self, n: i16) -> Result<(), Error> where
T: ByteOrder,
fn write_i16<T>(&mut self, n: i16) -> Result<(), Error> where
T: ByteOrder,
Writes a signed 16 bit integer to the underlying writer. Read more
sourcefn write_u24<T>(&mut self, n: u32) -> Result<(), Error> where
T: ByteOrder,
fn write_u24<T>(&mut self, n: u32) -> Result<(), Error> where
T: ByteOrder,
Writes an unsigned 24 bit integer to the underlying writer. Read more
sourcefn write_i24<T>(&mut self, n: i32) -> Result<(), Error> where
T: ByteOrder,
fn write_i24<T>(&mut self, n: i32) -> Result<(), Error> where
T: ByteOrder,
Writes a signed 24 bit integer to the underlying writer. Read more
sourcefn write_u32<T>(&mut self, n: u32) -> Result<(), Error> where
T: ByteOrder,
fn write_u32<T>(&mut self, n: u32) -> Result<(), Error> where
T: ByteOrder,
Writes an unsigned 32 bit integer to the underlying writer. Read more
sourcefn write_i32<T>(&mut self, n: i32) -> Result<(), Error> where
T: ByteOrder,
fn write_i32<T>(&mut self, n: i32) -> Result<(), Error> where
T: ByteOrder,
Writes a signed 32 bit integer to the underlying writer. Read more
sourcefn write_u48<T>(&mut self, n: u64) -> Result<(), Error> where
T: ByteOrder,
fn write_u48<T>(&mut self, n: u64) -> Result<(), Error> where
T: ByteOrder,
Writes an unsigned 48 bit integer to the underlying writer. Read more
sourcefn write_i48<T>(&mut self, n: i64) -> Result<(), Error> where
T: ByteOrder,
fn write_i48<T>(&mut self, n: i64) -> Result<(), Error> where
T: ByteOrder,
Writes a signed 48 bit integer to the underlying writer. Read more
sourcefn write_u64<T>(&mut self, n: u64) -> Result<(), Error> where
T: ByteOrder,
fn write_u64<T>(&mut self, n: u64) -> Result<(), Error> where
T: ByteOrder,
Writes an unsigned 64 bit integer to the underlying writer. Read more
sourcefn write_i64<T>(&mut self, n: i64) -> Result<(), Error> where
T: ByteOrder,
fn write_i64<T>(&mut self, n: i64) -> Result<(), Error> where
T: ByteOrder,
Writes a signed 64 bit integer to the underlying writer. Read more
sourcefn write_u128<T>(&mut self, n: u128) -> Result<(), Error> where
T: ByteOrder,
fn write_u128<T>(&mut self, n: u128) -> Result<(), Error> where
T: ByteOrder,
Writes an unsigned 128 bit integer to the underlying writer.
sourcefn write_i128<T>(&mut self, n: i128) -> Result<(), Error> where
T: ByteOrder,
fn write_i128<T>(&mut self, n: i128) -> Result<(), Error> where
T: ByteOrder,
Writes a signed 128 bit integer to the underlying writer.
sourcefn write_uint<T>(&mut self, n: u64, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
fn write_uint<T>(&mut self, n: u64, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
Writes an unsigned n-bytes integer to the underlying writer. Read more
sourcefn write_int<T>(&mut self, n: i64, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
fn write_int<T>(&mut self, n: i64, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
Writes a signed n-bytes integer to the underlying writer. Read more
sourcefn write_uint128<T>(&mut self, n: u128, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
fn write_uint128<T>(&mut self, n: u128, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
Writes an unsigned n-bytes integer to the underlying writer. Read more
sourcefn write_int128<T>(&mut self, n: i128, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
fn write_int128<T>(&mut self, n: i128, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
Writes a signed n-bytes integer to the underlying writer. Read more