Skip to main content

DataCollection

Trait DataCollection 

Source
pub trait DataCollection<T: Data> {
    // Required method
    fn transformation(self) -> Transformation<Vec<T>>;

    // Provided methods
    fn include<S: AsRef<str>>(
        self,
        paths: impl IntoIterator<Item = S>,
    ) -> Transformation<Vec<T>>
       where Self: Sized { ... }
    fn to_response(self, request: &Request) -> Response
       where Self: Sized { ... }
}
Expand description

Lists of data objects: PHP’s DataCollection and collect().

Required Methods§

Source

fn transformation(self) -> Transformation<Vec<T>>

The list’s transformation.

Provided Methods§

Source

fn include<S: AsRef<str>>( self, paths: impl IntoIterator<Item = S>, ) -> Transformation<Vec<T>>
where Self: Sized,

Includes lazy properties of each item: include().

Source

fn to_response(self, request: &Request) -> Response
where Self: Sized,

The response for request: toResponse().

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: Data> DataCollection<T> for Vec<T>

Implementors§