Struct nonymous::view::Class[][src]

pub struct Class<'s> {
    pub source: &'s [u8],
    pub offset: usize,
}
Expand description

A resource record CLASS (RFC 6895 § 3.2).

Examples

use nonymous::view::{Class, View};
let source = b"\x13\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
let (class, rest) = Class::view(source, 0..source.len())?;

Fields

source: &'s [u8]offset: usize

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.