Skip to main content

CoolEnvelope

Trait CoolEnvelope 

Source
pub trait CoolEnvelope:
    Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn request_content_type(&self) -> &'static str;
    fn response_content_type(&self) -> &'static str;
    fn open_request(
        &self,
        bytes: &[u8],
        _ctx: &mut CoolContext,
    ) -> Result<Vec<u8>, CoolError>;
    fn seal_response(
        &self,
        bytes: &[u8],
        _ctx: &CoolContext,
    ) -> Result<Vec<u8>, CoolError>;
}

Required Methods§

Source

fn request_content_type(&self) -> &'static str

Source

fn response_content_type(&self) -> &'static str

Source

fn open_request( &self, bytes: &[u8], _ctx: &mut CoolContext, ) -> Result<Vec<u8>, CoolError>

Source

fn seal_response( &self, bytes: &[u8], _ctx: &CoolContext, ) -> Result<Vec<u8>, CoolError>

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.

Implementors§