[−][src]Struct resolve::message::MsgWriter
Writes a single DNS message as a series of bytes.
Methods
impl<'a> MsgWriter<'a>[src]
impl<'a> MsgWriter<'a>pub fn new(data: &mut [u8]) -> MsgWriter[src]
pub fn new(data: &mut [u8]) -> MsgWriterConstructs a new message writer that will write into the given byte slice.
pub fn written(&self) -> usize[src]
pub fn written(&self) -> usizeReturns the number of bytes written so far.
pub fn into_bytes(self) -> &'a [u8][src]
pub fn into_bytes(self) -> &'a [u8]Returns a subslice of the wrapped byte slice that contains only the bytes written.
pub fn write(&mut self, data: &[u8]) -> Result<(), EncodeError>[src]
pub fn write(&mut self, data: &[u8]) -> Result<(), EncodeError>Writes a series of bytes to the message. Returns Err(TooLong) if the
whole buffer cannot be written.
pub fn write_character_string(&mut self, data: &[u8]) -> Result<(), EncodeError>[src]
pub fn write_character_string(&mut self, data: &[u8]) -> Result<(), EncodeError>Write a character string, as defined by RFC 1035.
pub fn write_name(&mut self, name: &str) -> Result<(), EncodeError>[src]
pub fn write_name(&mut self, name: &str) -> Result<(), EncodeError>Writes a name to the message.
pub fn write_byte(&mut self, data: u8) -> Result<(), EncodeError>[src]
pub fn write_byte(&mut self, data: u8) -> Result<(), EncodeError>Writes a single byte to the message.
pub fn write_u16(&mut self, data: u16) -> Result<(), EncodeError>[src]
pub fn write_u16(&mut self, data: u16) -> Result<(), EncodeError>Writes an unsigned 16 bit integer in big-endian format.
pub fn write_u32(&mut self, data: u32) -> Result<(), EncodeError>[src]
pub fn write_u32(&mut self, data: u32) -> Result<(), EncodeError>Writes an unsigned 32 bit integer in big-endian format.
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more