pub trait Layout {
type Error: Debug + From<Error>;
// Required methods
fn from_in(in_: In, ty: RequestType) -> Result<Self, Self::Error>
where Self: Sized;
fn json(&mut self, o: Value) -> Result<Value, Self::Error>;
fn render_error(e: Self::Error) -> Response<Bytes>;
// Provided methods
fn _page<P>(r: Request<Bytes>) -> Result<Response<Bytes>, Self::Error>
where P: Page<Self, Self::Error> + Serialize,
Self: Sized { ... }
fn page<P>(r: Request<Bytes>) -> Response<Bytes>
where P: Page<Self, Self::Error> + Serialize,
Self: Sized { ... }
fn action<A>(r: Request<Bytes>) -> Response<Bytes>
where A: Action<Self, Self::Error>,
Self: Sized { ... }
fn _action<A>(r: Request<Bytes>) -> Result<Response<Bytes>, Self::Error>
where A: Action<Self, Self::Error>,
Self: Sized { ... }
}Required Associated Types§
Required Methods§
fn from_in(in_: In, ty: RequestType) -> Result<Self, Self::Error>where
Self: Sized,
fn json(&mut self, o: Value) -> Result<Value, Self::Error>
fn render_error(e: Self::Error) -> Response<Bytes>
Provided Methods§
fn _page<P>(r: Request<Bytes>) -> Result<Response<Bytes>, Self::Error>
fn page<P>(r: Request<Bytes>) -> Response<Bytes>
fn action<A>(r: Request<Bytes>) -> Response<Bytes>
fn _action<A>(r: Request<Bytes>) -> Result<Response<Bytes>, Self::Error>
Object Safety§
This trait is not object safe.