pub struct RequestContext { /* private fields */ }Implementations§
Source§impl RequestContext
impl RequestContext
pub fn parse(line: &[u8]) -> Option<Self>
pub const fn kind(&self) -> RequestKind
pub const fn backend_id(&self) -> Option<BackendId>
pub const fn cache_entry_status(&self) -> Option<StatusCode>
pub const fn response_status(&self) -> Option<StatusCode>
pub const fn response_wire_len(&self) -> Option<ResponseWireLen>
pub fn verb(&self) -> &[u8] ⓘ
pub fn args(&self) -> &[u8] ⓘ
pub fn message_id(&self) -> Option<&str>
pub fn message_id_value(&self) -> Option<MessageId<'_>>
pub const fn has_message_id(&self) -> bool
pub const fn is_stat(&self) -> bool
pub const fn is_head(&self) -> bool
pub const fn is_unknown_extension(&self) -> bool
pub const fn route_class(&self) -> RequestRouteClass
pub const fn is_pipelineable(&self) -> bool
pub const fn is_large_transfer(&self) -> bool
pub fn request_wire_len(&self) -> RequestWireLen
Sourcepub async fn write_wire_to<W>(&self, writer: &mut W) -> Result<()>where
W: AsyncWrite + Unpin,
pub async fn write_wire_to<W>(&self, writer: &mut W) -> Result<()>where
W: AsyncWrite + Unpin,
Write the typed request as NNTP wire bytes without building a command buffer.
§Errors
Returns any I/O error from writing the request bytes to writer.
pub fn has_response_body(&self, status: StatusCode) -> bool
Trait Implementations§
Source§impl Clone for RequestContext
impl Clone for RequestContext
Auto Trait Implementations§
impl Freeze for RequestContext
impl RefUnwindSafe for RequestContext
impl Send for RequestContext
impl Sync for RequestContext
impl Unpin for RequestContext
impl UnsafeUnpin for RequestContext
impl UnwindSafe for RequestContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more