pub struct Attribute {
pub identifier: u16,
/* private fields */
}
Fields§
§identifier: u16
Implementations§
Source§impl Attribute
impl Attribute
pub fn parse<R: Read + Seek>(reader: &mut R) -> Result<Attribute>
pub fn new_string<ID: Into<u16>>(identifier: ID, value: &str) -> Attribute
pub fn new<ID: Into<u16>, V: NativeWrite>(identifier: ID, value: V) -> Attribute
pub fn len(&self) -> u16
pub fn total_len(&self) -> usize
pub fn as_u16(&self) -> Result<u16>
pub fn as_i32(&self) -> Result<i32>
pub fn as_u32(&self) -> Result<u32>
pub fn as_u64(&self) -> Result<u64>
pub fn as_string(&self) -> Result<String>
pub fn as_hardware_address(&self) -> Result<HardwareAddress>
pub fn as_bytes(&self) -> Vec<u8> ⓘ
pub fn write<W: Write>(&self, writer: &mut W) -> Result<()>
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnwindSafe for Attribute
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