pub enum ServerNamePayload {
HostName(DnsName),
IpAddress(PayloadU16),
Unknown(Payload),
}
Variants§
Implementations§
source§impl ServerNamePayload
impl ServerNamePayload
pub fn new_hostname(hostname: DnsName) -> Self
fn read_hostname(r: &mut Reader<'_>) -> Result<Self, InvalidMessage>
fn encode(&self, bytes: &mut Vec<u8>)
Trait Implementations§
source§impl Clone for ServerNamePayload
impl Clone for ServerNamePayload
source§fn clone(&self) -> ServerNamePayload
fn clone(&self) -> ServerNamePayload
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ServerNamePayload
impl RefUnwindSafe for ServerNamePayload
impl Send for ServerNamePayload
impl Sync for ServerNamePayload
impl Unpin for ServerNamePayload
impl UnwindSafe for ServerNamePayload
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