Struct breadx::display::RawRequest
source · [−]pub struct RawRequest<'target, 'req> { /* private fields */ }
Expand description
The raw request.
This structure essentially acts as a monomorphization of the
Request
trait. It contains all of the information needed
to send the request, such as the raw bytes, whether it has a
reply, and the name of the extension.
Implementations
sourceimpl<'target, 'req> RawRequest<'target, 'req>
impl<'target, 'req> RawRequest<'target, 'req>
sourcepub fn new(
data: &'target mut [IoSlice<'req>],
fds: Vec<Fd>,
variant: ReplyFdKind,
extension_name: Option<&'static str>,
buffer: &'req mut [u8; 8]
) -> Self
pub fn new(
data: &'target mut [IoSlice<'req>],
fds: Vec<Fd>,
variant: ReplyFdKind,
extension_name: Option<&'static str>,
buffer: &'req mut [u8; 8]
) -> Self
Create a new RawRequest
from its raw parts.
Panics
Panics if:
- There are less than three slices.
- The third slice is not at least four bytes long.
pub fn discard_mode(&self) -> Option<DiscardMode>
sourcepub fn variant(&self) -> ReplyFdKind
pub fn variant(&self) -> ReplyFdKind
Get the variant of the request.
sourcepub fn into_raw_parts(self) -> (Box<[u8]>, Vec<Fd>)
pub fn into_raw_parts(self) -> (Box<[u8]>, Vec<Fd>)
Once the RawRequest
is finished, this function will
return the parts that can be sent over the wire.
Auto Trait Implementations
impl<'target, 'req> RefUnwindSafe for RawRequest<'target, 'req>
impl<'target, 'req> Send for RawRequest<'target, 'req>
impl<'target, 'req> Sync for RawRequest<'target, 'req>
impl<'target, 'req> Unpin for RawRequest<'target, 'req> where
'req: 'target,
impl<'target, 'req> !UnwindSafe for RawRequest<'target, 'req>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more