Skip to main content

HyperProtocol

Struct HyperProtocol 

Source
pub struct HyperProtocol { /* private fields */ }

Implementations§

Methods from Deref<Target = RpMeta<Request<Incoming>>>§

Source

pub fn raw(&self) -> &Req

Source

pub fn raw_mut(&mut self) -> &mut Req

Source

pub fn clear_buffer(&mut self) -> Vec<u8>

Source

pub fn is_resp_empty(&self) -> bool

Source

pub fn write(&mut self, bytes: Bytes)

Source

pub fn write_string(&mut self, str: String)

Source

pub fn set_ctx_data(&mut self, key: String, value: Box<dyn Any + Send>)

Source

pub fn ctx_data(&self, key: &str) -> Option<&Box<dyn Any + Send>>

Source

pub fn ctx_data_remove(&mut self, key: &str) -> Option<Box<dyn Any + Send>>

Source

pub fn sid(&self) -> Option<&str>

Source

pub fn set_session(&mut self)

Source

pub fn session(&self)

Source

pub fn set_resp_sid(&mut self, sid: String)

Source

pub fn resp_sid(&self) -> Option<&str>

Trait Implementations§

Source§

impl Deref for HyperProtocol

Source§

type Target = RpMeta<Request<Incoming>>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for HyperProtocol

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl RoutableProtocol for HyperProtocol

Source§

type Req = Request<Incoming>

Source§

fn path(&self) -> &str

Source§

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

Source§

fn match_api( &self, apis: &Vec<&'static Api<Self>>, ) -> Option<&'static Api<Self>>

Source§

fn id(&self) -> isize

Source§

fn sync_body(&mut self) -> Result<Bytes, DceError>

Source§

fn sync_body_string(&mut self) -> Result<String, DceError>

Source§

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

Source§

fn try_print_err(&self, err: &Option<DceError>)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more