[−][src]Trait rubble::bytes::ToBytes
Trait for encoding a value into a byte buffer.
Required methods
fn to_bytes(&self, writer: &mut ByteWriter) -> Result<(), Error>
Converts self
to bytes and writes them into writer
, advancing writer
to point past the
encoded value.
If writer
does not contain enough space, an error will be returned and the state of the
buffer is unspecified (eg. self
may be partially written into writer
).
Implementors
impl ToBytes for AttUuid
[src]
fn to_bytes(&self, writer: &mut ByteWriter) -> Result<(), Error>
[src]
impl ToBytes for Channel
[src]
fn to_bytes(&self, writer: &mut ByteWriter) -> Result<(), Error>
[src]
impl ToBytes for Header
[src]
fn to_bytes(&self, writer: &mut ByteWriter) -> Result<(), Error>
[src]
impl ToBytes for FeatureSet
[src]
fn to_bytes(&self, writer: &mut ByteWriter) -> Result<(), Error>
[src]
impl ToBytes for Uuid
[src]
fn to_bytes(&self, buffer: &mut ByteWriter) -> Result<(), Error>
[src]
impl ToBytes for Uuid16
[src]
fn to_bytes(&self, buffer: &mut ByteWriter) -> Result<(), Error>
[src]
impl ToBytes for Uuid32
[src]
fn to_bytes(&self, buffer: &mut ByteWriter) -> Result<(), Error>
[src]
impl<'a> ToBytes for &'a [u8]
[src]
fn to_bytes(&self, writer: &mut ByteWriter) -> Result<(), Error>
[src]
impl<'a> ToBytes for AdStructure<'a>
[src]
fn to_bytes(&self, buf: &mut ByteWriter) -> Result<(), Error>
[src]
Lowers this AD structure into a Byte buffer.
Returns the number of Bytes of buf
that are used by this AD structure.
impl<'a> ToBytes for ControlPdu<'a>
[src]
fn to_bytes(&self, buffer: &mut ByteWriter) -> Result<(), Error>
[src]
impl<'a> ToBytes for ByGroupAttData<'a>
[src]
The ToBytes
impl will truncate the value if it doesn't fit.
fn to_bytes(&self, writer: &mut ByteWriter) -> Result<(), Error>
[src]
impl<'a> ToBytes for ByTypeAttData<'a>
[src]
fn to_bytes(&self, writer: &mut ByteWriter) -> Result<(), Error>
[src]
impl<'a, L: ToBytes> ToBytes for Pdu<'a, L>
[src]
Serializes the payload of the PDU to bytes.
The PDU header must be constructed using Link-Layer state (and Pdu::llid
).