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§
Sourcefn transformation(self) -> Transformation<Vec<T>>
fn transformation(self) -> Transformation<Vec<T>>
The list’s transformation.
Provided Methods§
Sourcefn include<S: AsRef<str>>(
self,
paths: impl IntoIterator<Item = S>,
) -> Transformation<Vec<T>>where
Self: Sized,
fn include<S: AsRef<str>>(
self,
paths: impl IntoIterator<Item = S>,
) -> Transformation<Vec<T>>where
Self: Sized,
Includes lazy properties of each item: include().
Sourcefn to_response(self, request: &Request) -> Responsewhere
Self: Sized,
fn to_response(self, request: &Request) -> Responsewhere
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".