Trait cyfs_lib::BodyOp

source ·
pub trait BodyOp {
    fn body_bytes<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn body_string<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; fn set_body(&mut self, body: impl Into<Body>); fn set_content_type(&mut self, mime: Mime) -> Option<HeaderValues>; }

Required Methods§

source

fn body_bytes<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

source

fn body_string<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

source

fn set_body(&mut self, body: impl Into<Body>)

source

fn set_content_type(&mut self, mime: Mime) -> Option<HeaderValues>

Implementations on Foreign Types§

source§

impl BodyOp for Request

source§

fn body_bytes<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

source§

fn body_string<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

source§

fn set_body(&mut self, body: impl Into<Body>)

source§

fn set_content_type(&mut self, mime: Mime) -> Option<HeaderValues>

source§

impl<State: Send> BodyOp for Request<State>

source§

fn body_bytes<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

source§

fn body_string<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

source§

fn set_body(&mut self, body: impl Into<Body>)

source§

fn set_content_type(&mut self, mime: Mime) -> Option<HeaderValues>

source§

impl BodyOp for Response

source§

fn body_bytes<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

source§

fn body_string<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

source§

fn set_body(&mut self, body: impl Into<Body>)

source§

fn set_content_type(&mut self, mime: Mime) -> Option<HeaderValues>

source§

impl BodyOp for Response

source§

fn body_bytes<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

source§

fn body_string<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

source§

fn set_body(&mut self, body: impl Into<Body>)

source§

fn set_content_type(&mut self, mime: Mime) -> Option<HeaderValues>

Implementors§