pub struct NdArray<T> {
pub dims: Vec<usize>,
pub data: Vec<T>,
}postgres_backend only.Expand description
Postgres allows multi-dimensional arrays of at most 6 dimensions. Internally they are stored as a flattened
representation with the dimension information encoded in the header. This struct represents a
multi-dimensional array with elements of type T as opposed to Vec
Fields§
§dims: Vec<usize>A list that describes how many values for each dimension are returned
data: Vec<T>The actual data flattened to a single array
This array contains values ordered by the left most dimension which means there will be dim[0] values for the first element of the second dimension followed by dim[0] values for the second element of the second dimensions and so up to dim[1] times. Afterwards that number of values is repeated for dim[2], and so for all dimensions in the dimension field above
Trait Implementations§
Source§impl<'__expr, T> AsExpression<Array<T>> for &'__expr NdArray<T>
impl<'__expr, T> AsExpression<Array<T>> for &'__expr NdArray<T>
Source§type Expression = Bound<Array<T>, &'__expr NdArray<T>>
type Expression = Bound<Array<T>, &'__expr NdArray<T>>
Source§fn as_expression(self) -> <Self as AsExpression<Array<T>>>::Expression
fn as_expression(self) -> <Self as AsExpression<Array<T>>>::Expression
Source§impl<T> AsExpression<Array<T>> for NdArray<T>
impl<T> AsExpression<Array<T>> for NdArray<T>
Source§type Expression = Bound<Array<T>, NdArray<T>>
type Expression = Bound<Array<T>, NdArray<T>>
Source§fn as_expression(self) -> <Self as AsExpression<Array<T>>>::Expression
fn as_expression(self) -> <Self as AsExpression<Array<T>>>::Expression
Source§impl<'__expr, T> AsExpression<Nullable<Array<T>>> for &'__expr NdArray<T>
impl<'__expr, T> AsExpression<Nullable<Array<T>>> for &'__expr NdArray<T>
Source§type Expression = Bound<Nullable<Array<T>>, &'__expr NdArray<T>>
type Expression = Bound<Nullable<Array<T>>, &'__expr NdArray<T>>
Source§fn as_expression(self) -> <Self as AsExpression<Nullable<Array<T>>>>::Expression
fn as_expression(self) -> <Self as AsExpression<Nullable<Array<T>>>>::Expression
Source§impl<T> AsExpression<Nullable<Array<T>>> for NdArray<T>
impl<T> AsExpression<Nullable<Array<T>>> for NdArray<T>
Source§fn as_expression(self) -> <Self as AsExpression<Nullable<Array<T>>>>::Expression
fn as_expression(self) -> <Self as AsExpression<Nullable<Array<T>>>>::Expression
Source§impl<T: Ord> Ord for NdArray<T>
impl<T: Ord> Ord for NdArray<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<T: PartialOrd> PartialOrd for NdArray<T>
impl<T: PartialOrd> PartialOrd for NdArray<T>
impl<T: Eq> Eq for NdArray<T>
impl<T> StructuralPartialEq for NdArray<T>
Auto Trait Implementations§
impl<T> Freeze for NdArray<T>
impl<T> RefUnwindSafe for NdArray<T>where
T: RefUnwindSafe,
impl<T> Send for NdArray<T>where
T: Send,
impl<T> Sync for NdArray<T>where
T: Sync,
impl<T> Unpin for NdArray<T>where
T: Unpin,
impl<T> UnsafeUnpin for NdArray<T>
impl<T> UnwindSafe for NdArray<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T, ST> AsExpressionList<ST> for T
impl<T, ST> AsExpressionList<ST> for T
Source§type Expression = <T as IntoArrayExpression<ST>>::ArrayExpression
type Expression = <T as IntoArrayExpression<ST>>::ArrayExpression
Use IntoArrayExpression instead
with-deprecated and non-crate feature without-deprecated only.Source§fn as_expression_list(self) -> <T as AsExpressionList<ST>>::Expression
fn as_expression_list(self) -> <T as AsExpressionList<ST>>::Expression
Use IntoArrayExpression instead
with-deprecated and non-crate feature without-deprecated only.Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> AggregateDistinct<Self>where
Self: DistinctDsl,
fn aggregate_distinct(self) -> AggregateDistinct<Self>where
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> AggregateAll<Self>where
Self: AllDsl,
fn aggregate_all(self) -> AggregateAll<Self>where
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> AggregateFilter<Self, P>
fn aggregate_filter<P>(self, f: P) -> AggregateFilter<Self, P>
Source§fn aggregate_order<O>(self, o: O) -> AggregateOrder<Self, O>where
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> AggregateOrder<Self, O>where
Self: OrderAggregateDsl<O>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T, ST, DB> FromSqlRow<ST, DB> for Twhere
T: Queryable<ST, DB>,
ST: SqlTypeOrSelectable,
DB: Backend,
<T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
impl<T, ST, DB> FromSqlRow<ST, DB> for Twhere
T: Queryable<ST, DB>,
ST: SqlTypeOrSelectable,
DB: Backend,
<T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
Source§impl<T, ST, DB> FromStaticSqlRow<ST, DB> for T
impl<T, ST, DB> FromStaticSqlRow<ST, DB> for T
Source§impl<ST, T> IntoArrayExpression<ST> for T
impl<ST, T> IntoArrayExpression<ST> for T
Source§type ArrayExpression = <T as AsExpression<Array<ST>>>::Expression
type ArrayExpression = <T as AsExpression<Array<ST>>>::Expression
postgres_backend only.Source§fn into_array_expression(
self,
) -> <T as IntoArrayExpression<ST>>::ArrayExpression
fn into_array_expression( self, ) -> <T as IntoArrayExpression<ST>>::ArrayExpression
postgres_backend only.ARRAY (values) clause for the given type