Struct ciboulette2pg::Ciboulette2PgRow[][src]

pub struct Ciboulette2PgRow<'rows> { /* fields omitted */ }

Row returned by a query

Made of the object id, type and its data

Implementations

impl<'rows> Ciboulette2PgRow<'rows>[src]

pub fn id(&self) -> &&'rows str[src]

The id of the resource, casted to TEXT

pub fn type_(&self) -> &&'rows str[src]

The type of the resource beeing returned, casted to TEXT In case of a relationships, this is the relationships chain

pub fn data(&self) -> &Option<&'rows RawValue>[src]

The json formatted data, if any

pub fn related_type(&self) -> &Option<&'rows str>[src]

The type id it relates to

pub fn related_id(&self) -> &Option<&'rows str>[src]

The id of the resource it relates

impl<'rows> Ciboulette2PgRow<'rows>[src]

pub fn from_raw(
    values: &'rows [PgRow]
) -> Result<Vec<Ciboulette2PgRow<'_>>, Ciboulette2PgError> where
    CibouletteId<'rows>: Decode<'rows, Postgres>,
    CibouletteId<'rows>: Type<Postgres>, 
[src]

Extract an Ciboulette2PgRow for a slice of PgRow

pub fn build_response_elements<I>(
    rows: I,
    store: &CibouletteStore,
    main_type: &Arc<CibouletteResourceType>,
    hint_size: Option<usize>
) -> Result<Vec<CibouletteResponseElement<'rows, &'rows RawValue>>, Ciboulette2PgError> where
    I: IntoIterator<Item = Ciboulette2PgRow<'rows>>, 
[src]

Build the responses elements for the main type from an iterator

Trait Implementations

impl<'rows> Clone for Ciboulette2PgRow<'rows>[src]

impl<'rows> Debug for Ciboulette2PgRow<'rows>[src]

impl<'rows, R: Row> FromRow<'rows, R> for Ciboulette2PgRow<'rows> where
    &'rows str: ColumnIndex<R>,
    &'rows str: Decode<'rows, R::Database>,
    &'rows str: Type<R::Database>,
    &'rows str: Decode<'rows, R::Database>,
    &'rows str: Type<R::Database>,
    Option<&'rows RawValue>: Decode<'rows, R::Database>,
    Option<&'rows RawValue>: Type<R::Database>,
    Option<&'rows str>: Decode<'rows, R::Database>,
    Option<&'rows str>: Type<R::Database>,
    Option<&'rows str>: Decode<'rows, R::Database>,
    Option<&'rows str>: Type<R::Database>, 
[src]

impl<'rows> Serialize for Ciboulette2PgRow<'rows>[src]

Auto Trait Implementations

impl<'rows> RefUnwindSafe for Ciboulette2PgRow<'rows>

impl<'rows> Send for Ciboulette2PgRow<'rows>

impl<'rows> Sync for Ciboulette2PgRow<'rows>

impl<'rows> Unpin for Ciboulette2PgRow<'rows>

impl<'rows> UnwindSafe for Ciboulette2PgRow<'rows>

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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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>,