pub struct ResponseParser;Expand description
Response parser for NNTP protocol
Implementations§
Source§impl ResponseParser
impl ResponseParser
Sourcepub fn is_success_response(data: &[u8]) -> bool
pub fn is_success_response(data: &[u8]) -> bool
Check if a response starts with a success code (2xx or 3xx)
Sourcepub fn is_greeting(data: &[u8]) -> bool
pub fn is_greeting(data: &[u8]) -> bool
Check if response is a greeting (200 or 201)
Sourcepub fn is_auth_required(data: &[u8]) -> bool
pub fn is_auth_required(data: &[u8]) -> bool
Check if response indicates authentication is required (381 or 480)
Sourcepub fn is_auth_success(data: &[u8]) -> bool
pub fn is_auth_success(data: &[u8]) -> bool
Check if response indicates successful authentication (281)
Sourcepub fn is_response_code(data: &[u8], code: u16) -> bool
pub fn is_response_code(data: &[u8], code: u16) -> bool
Check if response has a specific status code
This is useful for checking specific response codes like 111 (DATE response), or any other specific code that doesn’t have a dedicated helper.
Auto Trait Implementations§
impl Freeze for ResponseParser
impl RefUnwindSafe for ResponseParser
impl Send for ResponseParser
impl Sync for ResponseParser
impl Unpin for ResponseParser
impl UnwindSafe for ResponseParser
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