pub trait HostResponseOutparam {
    // Required methods
    fn set(
        &mut self,
        param: Resource<HostResponseOutparam>,
        response: Result<Resource<HostOutgoingResponse>, ErrorCode>,
    ) -> Result<(), Error>;
    fn drop(&mut self, rep: Resource<HostResponseOutparam>) -> Result<(), Error>;
}

Required Methods§

source

fn set( &mut self, param: Resource<HostResponseOutparam>, response: Result<Resource<HostOutgoingResponse>, ErrorCode>, ) -> Result<(), Error>

Set the value of the response-outparam to either send a response, or indicate an error.

This method consumes the response-outparam to ensure that it is called at most once. If it is never called, the implementation will respond with an error.

The user may provide an error to response to allow the implementation determine how to respond with an HTTP error response.

source

fn drop(&mut self, rep: Resource<HostResponseOutparam>) -> Result<(), Error>

Implementations on Foreign Types§

source§

impl<_T> HostResponseOutparam for &mut _T

source§

fn set( &mut self, param: Resource<HostResponseOutparam>, response: Result<Resource<HostOutgoingResponse>, ErrorCode>, ) -> Result<(), Error>

Set the value of the response-outparam to either send a response, or indicate an error.

This method consumes the response-outparam to ensure that it is called at most once. If it is never called, the implementation will respond with an error.

The user may provide an error to response to allow the implementation determine how to respond with an HTTP error response.

source§

fn drop(&mut self, rep: Resource<HostResponseOutparam>) -> Result<(), Error>

Implementors§