Skip to main content

Projection

Trait Projection 

Source
pub trait Projection {
    type Output;

    // Required methods
    fn selection_query(&self) -> SelectionQuery;
    fn decode_one(&self, value: JsonValue) -> Result<Self::Output, CoolError>;

    // Provided methods
    fn decode_many(
        &self,
        value: JsonValue,
    ) -> Result<Vec<Self::Output>, CoolError> { ... }
    fn decode_page(
        &self,
        value: JsonValue,
    ) -> Result<Page<Self::Output>, CoolError> { ... }
}

Required Associated Types§

Required Methods§

Provided Methods§

Source

fn decode_many(&self, value: JsonValue) -> Result<Vec<Self::Output>, CoolError>

Source

fn decode_page(&self, value: JsonValue) -> Result<Page<Self::Output>, CoolError>

Implementations on Foreign Types§

Source§

impl Projection for SelectionQuery

Implementors§