pub enum MnsError {
Parse(Error),
Attr(AttrError),
UnknownEventType(String),
MissingEventType,
MissingEvent,
Obex(ObexError),
Transport(TransportError),
UnexpectedEof,
UnexpectedOpcode(u8),
InvalidTarget,
}Expand description
MNS server and event report XML parsing errors.
Variants§
Parse(Error)
quick-xml reader error encountered while parsing the event report body.
Attr(AttrError)
Attribute value in the <event> element could not be decoded.
UnknownEventType(String)
type attribute value did not match any MAP 1.4 event type; inner string is the raw value.
MissingEventType
<event> element present but type attribute is absent.
MissingEvent
Document contained no <event> element; body may be empty or malformed.
Obex(ObexError)
Packet decode failure while framing an MNS request or response.
Transport(TransportError)
I/O failure reading or writing the MNS OBEX stream.
UnexpectedEof
Transport stream closed before the device sent a clean OBEX DISCONNECT.
UnexpectedOpcode(u8)
Device sent an opcode other than PUT, PUT_FINAL, or DISCONNECT after CONNECT.
InvalidTarget
CONNECT request Target header is absent or does not match the MNS service UUID.
Trait Implementations§
Source§impl Error for MnsError
impl Error for MnsError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<TransportError> for MnsError
impl From<TransportError> for MnsError
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for MnsError
impl !UnwindSafe for MnsError
impl Freeze for MnsError
impl Send for MnsError
impl Sync for MnsError
impl Unpin for MnsError
impl UnsafeUnpin for MnsError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more