pub struct List<M>(/* private fields */);Expand description
A sized marker type representing “list of M”.
Used as a type parameter to [Statement], Load, and other
types to encode that the result is a collection of M values. Unlike [M]
(which is unsized), List<M> is always Sized, so it composes cleanly in
tuples: (List<User>, List<Todo>) is valid.
Trait Implementations§
Source§impl<T, E: IntoExpr<T>> Assign<List<T>> for &[E]
impl<T, E: IntoExpr<T>> Assign<List<T>> for &[E]
Source§fn into_assignment(self) -> Assignment<List<T>>
fn into_assignment(self) -> Assignment<List<T>>
Convert into an
Assignment<T> value.Source§fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
Record one or more assignments into the given [
Assignments] map at
the specified projection.Source§impl<T, U: IntoExpr<T>, const N: usize> Assign<List<T>> for &[U; N]
impl<T, U: IntoExpr<T>, const N: usize> Assign<List<T>> for &[U; N]
Source§fn into_assignment(self) -> Assignment<List<T>>
fn into_assignment(self) -> Assignment<List<T>>
Convert into an
Assignment<T> value.Source§fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
Record one or more assignments into the given [
Assignments] map at
the specified projection.Source§impl<T, U: IntoExpr<T>, const N: usize> Assign<List<T>> for [U; N]
impl<T, U: IntoExpr<T>, const N: usize> Assign<List<T>> for [U; N]
Source§fn into_assignment(self) -> Assignment<List<T>>
fn into_assignment(self) -> Assignment<List<T>>
Convert into an
Assignment<T> value.Source§fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
Record one or more assignments into the given [
Assignments] map at
the specified projection.Source§impl<T, U: IntoExpr<T>> Assign<List<T>> for Vec<U>
impl<T, U: IntoExpr<T>> Assign<List<T>> for Vec<U>
Source§fn into_assignment(self) -> Assignment<List<T>>
fn into_assignment(self) -> Assignment<List<T>>
Convert into an
Assignment<T> value.Source§fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
fn assign(self, assignments: &mut Assignments, projection: Projection)where
Self: Sized,
Record one or more assignments into the given [
Assignments] map at
the specified projection.Source§impl<M: Load> Load for List<M>
List type encoding: List<M> loads as Vec<M::Output>.
impl<M: Load> Load for List<M>
List type encoding: List<M> loads as Vec<M::Output>.
Source§fn ty() -> Type
fn ty() -> Type
Returns the
stmt::Type that describes values of this type.Source§fn ty_relation() -> Type
fn ty_relation() -> Type
Returns the
stmt::Type used when this type appears as a relation
target. The default delegates to ty().Auto Trait Implementations§
impl<M> Freeze for List<M>
impl<M> RefUnwindSafe for List<M>where
M: RefUnwindSafe,
impl<M> Send for List<M>where
M: Send,
impl<M> Sync for List<M>where
M: Sync,
impl<M> Unpin for List<M>where
M: Unpin,
impl<M> UnsafeUnpin for List<M>
impl<M> UnwindSafe for List<M>where
M: 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