[−][src]Struct pgx::datum::Array
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]
elements: *mut Datum,
nulls: *mut bool,
nelems: usize
) -> Array<'a, T>
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]
Notable traits for ArrayIterator<'a, T>
impl<'a, T: FromDatum> Iterator for ArrayIterator<'a, T> type Item = Option<T>;
Return an Iterator of Option
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]
Notable traits for ArrayTypedIterator<'a, T>
impl<'a, T: FromDatum> Iterator for ArrayTypedIterator<'a, T> type Item = T;
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]
unsafe fn from_datum(
datum: usize,
is_null: bool,
typoid: u32
) -> Option<Array<'a, T>>
[src]
datum: usize,
is_null: bool,
typoid: u32
) -> Option<Array<'a, T>>
unsafe fn from_datum_in_memory_context(
memory_context: PgMemoryContexts,
datum: Datum,
is_null: bool,
typoid: Oid
) -> Option<Self> where
Self: Sized,
[src]
memory_context: PgMemoryContexts,
datum: Datum,
is_null: bool,
typoid: Oid
) -> Option<Self> where
Self: Sized,
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?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a, T: FromDatum + Serialize> Serialize for Array<'a, T>
[src]
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Array<'a, T> where
T: RefUnwindSafe,
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,
T: Unpin,
impl<'a, T> UnwindSafe for Array<'a, T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
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?
fn into_iter(self) -> I
[src]
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,