pub struct Fmt<T, F> { /* private fields */ }Expand description
Implements ToSql by calling formatter on contents.
Implementations§
Source§impl<I: IntoIterator<Item = T>, T: ToSql> Fmt<I, fn(I, &mut String, SqlFormat)>
impl<I: IntoIterator<Item = T>, T: ToSql> Fmt<I, fn(I, &mut String, SqlFormat)>
Sourcepub fn comma_separated(into_iter: I) -> Self
pub fn comma_separated(into_iter: I) -> Self
Formats values with a comma and a space separating them.
Sourcepub fn verbar_separated(into_iter: I) -> Self
pub fn verbar_separated(into_iter: I) -> Self
Formats values with a verbar and a space separating them.
Sourcepub fn pretty_comma_separated(into_iter: I) -> Self
pub fn pretty_comma_separated(into_iter: I) -> Self
Formats values with a comma and a space separating them or, if pretty printing is in effect, a comma, a newline, and indentation.
Sourcepub fn one_line_separated(into_iter: I) -> Self
pub fn one_line_separated(into_iter: I) -> Self
Formats values with a new line separating them.
Trait Implementations§
Auto Trait Implementations§
impl<T, F> !Freeze for Fmt<T, F>
impl<T, F> !RefUnwindSafe for Fmt<T, F>
impl<T, F> Send for Fmt<T, F>
impl<T, F> !Sync for Fmt<T, F>
impl<T, F> Unpin for Fmt<T, F>
impl<T, F> UnsafeUnpin for Fmt<T, F>where
F: UnsafeUnpin,
T: UnsafeUnpin,
impl<T, F> UnwindSafe for Fmt<T, F>where
F: UnwindSafe,
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
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