pub struct ExaIter<I, T>{ /* 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<T, I> Encode<'_, Exasol> for ExaIter<I, T>
impl<T, I> Encode<'_, Exasol> for ExaIter<I, T>
Auto Trait Implementations§
impl<I, T> Freeze for ExaIter<I, T>where
I: Freeze,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more