pub trait Host:
Sized
+ Send
+ Sync {
type Error: Error + Send + Sync + 'static;
type Instance<O: OperationDeclaration>: Instance<O, Error = Self::Error>;
// Required methods
fn context(&self) -> &CallContext;
fn with_value<T>(&self, value: T) -> Result<Self, ContextError>
where T: ContextValue;
fn submit<O>(
&self,
request: <O as OperationDeclaration>::Request,
) -> impl Future<Output = Result<Self::Instance<O>, Self::Error>> + Send
where O: OperationDeclaration;
fn submit_owned<O>(
&self,
request: <O as OperationDeclaration>::Request,
claims: RequestClaims,
) -> impl Future<Output = Result<Self::Instance<O>, Self::Error>> + Send
where O: OperationDeclaration;
fn call<O>(
&self,
request: <O as OperationDeclaration>::Request,
) -> impl Future<Output = Result<Response<<O as OperationDeclaration>::Response>, Self::Error>> + Send
where O: OperationDeclaration;
fn publish_on<S>(
&self,
row: &<S as StreamSpec>::Row,
) -> impl Future<Output = Result<(), Self::Error>> + Send
where S: StreamSpec,
<S as StreamSpec>::Row: Message;
// Provided methods
fn call_owned<O>(
&self,
request: <O as OperationDeclaration>::Request,
claims: RequestClaims,
) -> impl Future<Output = Result<Response<<O as OperationDeclaration>::Response>, Self::Error>> + Send
where O: OperationDeclaration { ... }
fn publish<S>(
&self,
row: &S,
) -> impl Future<Output = Result<(), Self::Error>> + Send
where S: StreamSpec<Row = S> + Message { ... }
}Required Associated Types§
type Error: Error + Send + Sync + 'static
type Instance<O: OperationDeclaration>: Instance<O, Error = Self::Error>
Required Methods§
fn context(&self) -> &CallContext
fn with_value<T>(&self, value: T) -> Result<Self, ContextError>where
T: ContextValue,
fn submit<O>(
&self,
request: <O as OperationDeclaration>::Request,
) -> impl Future<Output = Result<Self::Instance<O>, Self::Error>> + Sendwhere
O: OperationDeclaration,
fn submit_owned<O>(
&self,
request: <O as OperationDeclaration>::Request,
claims: RequestClaims,
) -> impl Future<Output = Result<Self::Instance<O>, Self::Error>> + Sendwhere
O: OperationDeclaration,
fn call<O>(
&self,
request: <O as OperationDeclaration>::Request,
) -> impl Future<Output = Result<Response<<O as OperationDeclaration>::Response>, Self::Error>> + Sendwhere
O: OperationDeclaration,
fn publish_on<S>( &self, row: &<S as StreamSpec>::Row, ) -> impl Future<Output = Result<(), Self::Error>> + Send
Provided Methods§
fn call_owned<O>(
&self,
request: <O as OperationDeclaration>::Request,
claims: RequestClaims,
) -> impl Future<Output = Result<Response<<O as OperationDeclaration>::Response>, Self::Error>> + Sendwhere
O: OperationDeclaration,
fn publish<S>(
&self,
row: &S,
) -> impl Future<Output = Result<(), Self::Error>> + Sendwhere
S: StreamSpec<Row = S> + Message,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".