Skip to main content

Serve

Trait Serve 

Source
pub trait Serve {
    const CONTRACT: &'static str;

    // Required method
    fn serve<'a>(
        &'a self,
        method: &'a str,
        arguments: Value,
    ) -> BoxFuture<'a, Result<Value>>;
}
Expand description

Written by #[contract] for every contract trait, so a split app can serve it.

Required Associated Constants§

Source

const CONTRACT: &'static str

<contract crate>/<trait>, the same in the app that calls and the one that serves.

Required Methods§

Source

fn serve<'a>( &'a self, method: &'a str, arguments: Value, ) -> BoxFuture<'a, Result<Value>>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§