pub struct Parser<'a> {
pub msg: &'a [u8],
pub header: HeaderInternal,
pub section: Section,
pub off: usize,
pub index: usize,
pub res_header_valid: bool,
pub res_header: ResourceHeader,
}
Fields
msg: &'a [u8]
header: HeaderInternal
section: Section
off: usize
index: usize
res_header_valid: bool
res_header: ResourceHeader
Implementations
sourceimpl<'a> Parser<'a>
impl<'a> Parser<'a>
pub fn start(&mut self, msg: &'a [u8]) -> Result<Header, Error>
pub fn question(&mut self) -> Result<Question, Error>
pub fn all_questions(&mut self) -> Result<Vec<Question>, Error>
pub fn skip_question(&mut self) -> Result<(), Error>
pub fn skip_all_questions(&mut self) -> Result<(), Error>
pub fn answer_header(&mut self) -> Result<ResourceHeader, Error>
pub fn answer(&mut self) -> Result<Resource, Error>
pub fn all_answers(&mut self) -> Result<Vec<Resource>, Error>
pub fn skip_answer(&mut self) -> Result<(), Error>
pub fn skip_all_answers(&mut self) -> Result<(), Error>
pub fn additional_header(&mut self) -> Result<ResourceHeader, Error>
pub fn additional(&mut self) -> Result<Resource, Error>
pub fn all_additionals(&mut self) -> Result<Vec<Resource>, Error>
pub fn skip_additional(&mut self) -> Result<(), Error>
pub fn skip_all_additionals(&mut self) -> Result<(), Error>
pub fn resource_body(&mut self) -> Result<Box<dyn ResourceBody>, Error>
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Parser<'a>
impl<'a> Send for Parser<'a>
impl<'a> Sync for Parser<'a>
impl<'a> Unpin for Parser<'a>
impl<'a> UnwindSafe for Parser<'a>
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