[−][src]Trait mqtt::encodable::Decodable
Methods for decoding bytes to an Object according to MQTT specification
Associated Types
Loading content...Required methods
fn decode_with<R: Read>(
reader: &mut R,
cond: Option<Self::Cond>
) -> Result<Self, Self::Err>
reader: &mut R,
cond: Option<Self::Cond>
) -> Result<Self, Self::Err>
Decodes object with additional data (or hints)
Provided methods
Loading content...Implementations on Foreign Types
impl Decodable for String
[src]
type Err = StringEncodeError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<String, StringEncodeError>
[src]
reader: &mut R,
_rest: Option<()>
) -> Result<String, StringEncodeError>
impl Decodable for Vec<u8>
[src]
type Err = Error
type Cond = u32
fn decode_with<R: Read>(
reader: &mut R,
length: Option<u32>
) -> Result<Vec<u8>, Error>
[src]
reader: &mut R,
length: Option<u32>
) -> Result<Vec<u8>, Error>
impl Decodable for ()
[src]
type Err = NoError
type Cond = ()
fn decode_with<R: Read>(_: &mut R, _: Option<()>) -> Result<(), NoError>
[src]
Implementors
impl Decodable for ConnectReturnCode
[src]
type Err = VariableHeaderError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<ConnectReturnCode, VariableHeaderError>
[src]
reader: &mut R,
_rest: Option<()>
) -> Result<ConnectReturnCode, VariableHeaderError>
impl Decodable for VariablePacket
[src]
type Err = VariablePacketError
type Cond = FixedHeader
fn decode_with<R: Read>(
reader: &mut R,
fixed_header: Option<FixedHeader>
) -> Result<VariablePacket, Self::Err>
[src]
reader: &mut R,
fixed_header: Option<FixedHeader>
) -> Result<VariablePacket, Self::Err>
impl Decodable for FixedHeader
[src]
type Err = FixedHeaderError
type Cond = ()
fn decode_with<R: Read>(
rdr: &mut R,
_rest: Option<()>
) -> Result<FixedHeader, FixedHeaderError>
[src]
rdr: &mut R,
_rest: Option<()>
) -> Result<FixedHeader, FixedHeaderError>
impl Decodable for ProtocolLevel
[src]
type Err = VariableHeaderError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<ProtocolLevel, VariableHeaderError>
[src]
reader: &mut R,
_rest: Option<()>
) -> Result<ProtocolLevel, VariableHeaderError>
impl Decodable for ConnackFlags
[src]
type Err = VariableHeaderError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<ConnackFlags, VariableHeaderError>
[src]
reader: &mut R,
_rest: Option<()>
) -> Result<ConnackFlags, VariableHeaderError>
impl Decodable for ConnectFlags
[src]
type Err = VariableHeaderError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<ConnectFlags, VariableHeaderError>
[src]
reader: &mut R,
_rest: Option<()>
) -> Result<ConnectFlags, VariableHeaderError>
impl Decodable for KeepAlive
[src]
type Err = VariableHeaderError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<KeepAlive, VariableHeaderError>
[src]
reader: &mut R,
_rest: Option<()>
) -> Result<KeepAlive, VariableHeaderError>
impl Decodable for PacketIdentifier
[src]
type Err = VariableHeaderError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<PacketIdentifier, VariableHeaderError>
[src]
reader: &mut R,
_rest: Option<()>
) -> Result<PacketIdentifier, VariableHeaderError>
impl Decodable for ProtocolName
[src]
type Err = VariableHeaderError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<ProtocolName, VariableHeaderError>
[src]
reader: &mut R,
_rest: Option<()>
) -> Result<ProtocolName, VariableHeaderError>
impl Decodable for TopicNameHeader
[src]
type Err = VariableHeaderError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<TopicNameHeader, VariableHeaderError>
[src]
reader: &mut R,
_rest: Option<()>
) -> Result<TopicNameHeader, VariableHeaderError>
impl Decodable for VarBytes
[src]
type Err = Error
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_: Option<()>
) -> Result<VarBytes, Error>
[src]
reader: &mut R,
_: Option<()>
) -> Result<VarBytes, Error>
impl Decodable for ConnectPacketPayload
[src]
type Err = ConnectPacketPayloadError
type Cond = ConnectFlags
fn decode_with<R: Read>(
reader: &mut R,
rest: Option<ConnectFlags>
) -> Result<ConnectPacketPayload, ConnectPacketPayloadError>
[src]
reader: &mut R,
rest: Option<ConnectFlags>
) -> Result<ConnectPacketPayload, ConnectPacketPayloadError>
impl Decodable for SubackPacketPayload
[src]
type Err = SubackPacketPayloadError
type Cond = u32
fn decode_with<R: Read>(
reader: &mut R,
payload_len: Option<u32>
) -> Result<SubackPacketPayload, SubackPacketPayloadError>
[src]
reader: &mut R,
payload_len: Option<u32>
) -> Result<SubackPacketPayload, SubackPacketPayloadError>
impl Decodable for SubscribePacketPayload
[src]
type Err = SubscribePacketPayloadError
type Cond = u32
fn decode_with<R: Read>(
reader: &mut R,
payload_len: Option<u32>
) -> Result<SubscribePacketPayload, SubscribePacketPayloadError>
[src]
reader: &mut R,
payload_len: Option<u32>
) -> Result<SubscribePacketPayload, SubscribePacketPayloadError>
impl Decodable for UnsubscribePacketPayload
[src]
type Err = UnsubscribePacketPayloadError
type Cond = u32
fn decode_with<R: Read>(
reader: &mut R,
payload_len: Option<u32>
) -> Result<UnsubscribePacketPayload, UnsubscribePacketPayloadError>
[src]
reader: &mut R,
payload_len: Option<u32>
) -> Result<UnsubscribePacketPayload, UnsubscribePacketPayloadError>
impl Decodable for TopicFilter
[src]
type Err = TopicFilterError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<TopicFilter, TopicFilterError>
[src]
reader: &mut R,
_rest: Option<()>
) -> Result<TopicFilter, TopicFilterError>
impl Decodable for TopicName
[src]
type Err = TopicNameError
type Cond = ()
fn decode_with<R: Read>(
reader: &mut R,
_rest: Option<()>
) -> Result<TopicName, TopicNameError>
[src]
reader: &mut R,
_rest: Option<()>
) -> Result<TopicName, TopicNameError>
impl<T: Packet + Debug + 'static> Decodable for T
[src]
type Err = PacketError<T>
type Cond = FixedHeader
fn decode_with<R: Read>(
reader: &mut R,
fixed_header: Option<FixedHeader>
) -> Result<Self, PacketError<Self>>
[src]
reader: &mut R,
fixed_header: Option<FixedHeader>
) -> Result<Self, PacketError<Self>>