Struct sqlx_exasol::ExaIter
source · pub struct ExaIter<I, T>where
I: IntoIterator<Item = T> + Clone,
for<'q> T: Encode<'q, Exasol> + Type<Exasol>,{ /* private fields */ }Expand description
Adapter allowing any iterator of encodable values to be passed as a parameter set / array to Exasol.
Note that the iterator must implement Clone because
it’s used in multiple places. Therefore, prefer using iterators over
references than owning variants.
use sqlx_exasol::ExaIter;
// Don't do this, as the iterator gets cloned internally.
let vector = vec![1, 2, 3];
let owned_iter = ExaIter::from(vector);
// Rather, prefer using something cheaper to clone, like:
let vector = vec![1, 2, 3];
let borrowed_iter = ExaIter::from(vector.as_slice());Trait Implementations§
source§impl<I, T> Debug for ExaIter<I, T>where
I: IntoIterator<Item = T> + Clone + Debug,
for<'q> T: Encode<'q, Exasol> + Type<Exasol> + Debug,
impl<I, T> Debug for ExaIter<I, T>where I: IntoIterator<Item = T> + Clone + Debug, for<'q> T: Encode<'q, Exasol> + Type<Exasol> + Debug,
source§impl<T, I> Encode<'_, Exasol> for ExaIter<I, T>where
I: IntoIterator<Item = T> + Clone,
for<'q> T: Encode<'q, Exasol> + Type<Exasol>,
impl<T, I> Encode<'_, Exasol> for ExaIter<I, T>where I: IntoIterator<Item = T> + Clone, for<'q> T: Encode<'q, Exasol> + Type<Exasol>,
fn produces(&self) -> Option<<Exasol as Database>::TypeInfo>
source§fn encode_by_ref(&self, buf: &mut ExaBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut ExaBuffer) -> IsNull
fn size_hint(&self) -> usize
source§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere Self: Sized,
Writes the value of
self into buf in the expected format for the database.source§impl<I, T> From<I> for ExaIter<I, T>where
I: IntoIterator<Item = T> + Clone,
for<'q> T: Encode<'q, Exasol> + Type<Exasol>,
impl<I, T> From<I> for ExaIter<I, T>where I: IntoIterator<Item = T> + Clone, for<'q> T: Encode<'q, Exasol> + Type<Exasol>,
Auto Trait Implementations§
impl<I, T> RefUnwindSafe for ExaIter<I, T>where I: RefUnwindSafe,
impl<I, T> Send for ExaIter<I, T>where I: Send,
impl<I, T> Sync for ExaIter<I, T>where I: Sync,
impl<I, T> Unpin for ExaIter<I, T>where I: Unpin,
impl<I, T> UnwindSafe for ExaIter<I, T>where I: 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