pub trait Resource {
type Context;
type Body;
// Required methods
fn show(ctx: Self::Context) -> Self::Body;
fn create(ctx: Self::Context) -> Self::Body;
fn update(ctx: Self::Context) -> Self::Body;
fn delete(ctx: Self::Context) -> Self::Body;
fn edit(ctx: Self::Context) -> Self::Body;
fn new(ctx: Self::Context) -> Self::Body;
// Provided method
fn build<'a>(
opts: ResourceOptions,
) -> Vec<((&'a str, &'a str, &'a Method), fn(Self::Context) -> Self::Body)> { ... }
}
Required Associated Types§
Required Methods§
fn show(ctx: Self::Context) -> Self::Body
fn create(ctx: Self::Context) -> Self::Body
fn update(ctx: Self::Context) -> Self::Body
fn delete(ctx: Self::Context) -> Self::Body
fn edit(ctx: Self::Context) -> Self::Body
fn new(ctx: Self::Context) -> Self::Body
Provided Methods§
fn build<'a>( opts: ResourceOptions, ) -> Vec<((&'a str, &'a str, &'a Method), fn(Self::Context) -> Self::Body)>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.