pub fn try_push(
        &mut self,
        character_string: &CharacterString,
    ) -> Result<(), RdataTooLongError> {
        if self.octets_written + character_string.len() + 1 > (u16::MAX as usize) {
            Err(RdataTooLongError)
        } else {
            self.buf.reserve(1 + character_string.len());
            self.buf.push(character_string.len() as u8);
            self.buf.extend_from_slice(character_string);
            self.octets_written += character_string.len() + 1;
            Ok(())
        }
    }
/// Attempts to serialize an additional `<character-string>` into
/// the underlying buffer. If this would exceed the maximum RDATA
/// length of 65,535 octets, then this will fail.
Attempts to serialize an additional `` into
the underlying buffer. If this would exceed the maximum RDATA
length of 65,535 octets, then this will fail.
Attempts to serialize an additional ` ` into the underlying buffer . If this would exceed the maximum RDATA length of 65 535 octets then this will fail .
pub fn try_push(
        &mut self,
        character_string: &CharacterString,
    ) -> Result<(), RdataTooLongError> {
        if self.octets_written + character_string.len() + 1 > (u16::MAX as usize) {
            Err(RdataTooLongError)
        } else {
            self.buf.reserve(1 + character_string.len());
            self.buf.push(character_string.len() as u8);
            self.buf.extend_from_slice(character_string);
            self.octets_written += character_string.len() + 1;
            Ok(())
        }
    }
pub fn try_push ( & mut self , character_string : & CharacterString , ) -> Result < ( ) , RdataTooLongError > { if self . octets_written + character_string . len ( ) + 1 > ( u16 :: MAX as usize ) { Err ( RdataTooLongError ) } else { self . buf . reserve ( 1 + character_string . len ( ) ) ; self . buf . push ( character_string . len ( ) as u8 ) ; self . buf . extend_from_slice ( character_string ) ; self . octets_written += character_string . len ( ) + 1 ; Ok ( ( ) ) } }
Attempts to serialize an additional `<character-string>` into
the underlying buffer.
Attempts to serialize an additional ` <character - string > ` into the underlying buffer .
&mut self
character_string
&CharacterString
&mut self
character_string
&CharacterString