[][src]Struct pgx::datum::Array

pub struct Array<'a, T: FromDatum> { /* fields omitted */ }

Implementations

impl<'a, T: FromDatum> Array<'a, T>[src]

pub unsafe fn over(
    elements: *mut Datum,
    nulls: *mut bool,
    nelems: usize
) -> Array<'a, T>
[src]

Create an Array over an array of pg_sys::Datum values and a corresponding array of "is_null" indicators

[T] can be pg_sys::Datum if the elements are not all of the same type

Safety

This function is unsafe as it can't validate the provided pointer are valid or that

pub fn into_array_type(self) -> *const ArrayType[src]

pub fn as_slice(&self) -> &[T][src]

pub fn iter(&self) -> ArrayIterator<'_, T>

Notable traits for ArrayIterator<'a, T>

impl<'a, T: FromDatum> Iterator for ArrayIterator<'a, T> type Item = Option<T>;
[src]

Return an Iterator of Option over the contained Datums.

pub fn iter_deny_null(&self) -> ArrayTypedIterator<'_, T>

Notable traits for ArrayTypedIterator<'a, T>

impl<'a, T: FromDatum> Iterator for ArrayTypedIterator<'a, T> type Item = T;
[src]

Return an Iterator of the contained Datums (converted to Rust types).

This function will panic when called if the array contains any SQL NULL values.

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn get(&self, i: usize) -> Option<Option<T>>[src]

Trait Implementations

impl<'a, T: FromDatum> Drop for Array<'a, T>[src]

impl<'a, T: FromDatum> FromDatum for Array<'a, T>[src]

impl<'a, T: FromDatum> IntoIterator for Array<'a, T>[src]

type Item = Option<T>

The type of the elements being iterated over.

type IntoIter = ArrayIntoIterator<'a, T>

Which kind of iterator are we turning this into?

impl<'a, T: FromDatum + Serialize> Serialize for Array<'a, T>[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for Array<'a, T> where
    T: RefUnwindSafe

impl<'a, T> !Send for Array<'a, T>

impl<'a, T> !Sync for Array<'a, T>

impl<'a, T> Unpin for Array<'a, T> where
    T: Unpin

impl<'a, T> UnwindSafe for Array<'a, T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,