Struct Separated
pub struct Separated<'qb, 'args, DB, Sep>where
'args: 'qb,
DB: Database,{
query_builder: &'qb mut QueryBuilder<'args, DB>,
separator: Sep,
push_separator: bool,
}Expand description
A wrapper around QueryBuilder for creating comma(or other token)-separated lists.
See QueryBuilder::separated() for details.
Fields§
§query_builder: &'qb mut QueryBuilder<'args, DB>§separator: Sep§push_separator: boolImplementations§
§impl<'qb, 'args, DB, Sep> Separated<'qb, 'args, DB, Sep>
impl<'qb, 'args, DB, Sep> Separated<'qb, 'args, DB, Sep>
pub fn push(&mut self, sql: impl Display) -> &mut Separated<'qb, 'args, DB, Sep>
pub fn push(&mut self, sql: impl Display) -> &mut Separated<'qb, 'args, DB, Sep>
Push the separator if applicable, and then the given SQL fragment.
See QueryBuilder::push() for details.
pub fn push_unseparated(
&mut self,
sql: impl Display,
) -> &mut Separated<'qb, 'args, DB, Sep>
pub fn push_unseparated( &mut self, sql: impl Display, ) -> &mut Separated<'qb, 'args, DB, Sep>
Push a SQL fragment without a separator.
Simply calls QueryBuilder::push() directly.
pub fn push_bind<T>(&mut self, value: T) -> &mut Separated<'qb, 'args, DB, Sep>
pub fn push_bind<T>(&mut self, value: T) -> &mut Separated<'qb, 'args, DB, Sep>
Push the separator if applicable, then append a bind argument.
See QueryBuilder::push_bind() for details.
pub fn push_bind_unseparated<T>(
&mut self,
value: T,
) -> &mut Separated<'qb, 'args, DB, Sep>
pub fn push_bind_unseparated<T>( &mut self, value: T, ) -> &mut Separated<'qb, 'args, DB, Sep>
Push a bind argument placeholder (? or $N for Postgres) and bind a value to it
without a separator.
Simply calls QueryBuilder::push_bind() directly.
Auto Trait Implementations§
impl<'qb, 'args, DB, Sep> Freeze for Separated<'qb, 'args, DB, Sep>where
Sep: Freeze,
impl<'qb, 'args, DB, Sep> RefUnwindSafe for Separated<'qb, 'args, DB, Sep>
impl<'qb, 'args, DB, Sep> Send for Separated<'qb, 'args, DB, Sep>where
Sep: Send,
impl<'qb, 'args, DB, Sep> Sync for Separated<'qb, 'args, DB, Sep>
impl<'qb, 'args, DB, Sep> Unpin for Separated<'qb, 'args, DB, Sep>where
Sep: Unpin,
impl<'qb, 'args, DB, Sep> !UnwindSafe for Separated<'qb, 'args, DB, Sep>
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].