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§
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>
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.