pub enum MapError {
Obex(ObexError),
Transport(TransportError),
ServerError(u8),
UnexpectedEof,
MessageListing(MessageListingError),
ResponseTooLarge,
InvalidEncoding,
InvalidMessage(BMessageError),
MissingHandle,
InvalidInput(&'static str),
FolderListing(XmlError),
}Expand description
MAP client/MNS errors — OBEX, transport, server response, parse, input validation, and encoding.
Variants§
Obex(ObexError)
Wraps ObexError; packet decode, invalid OBEX state, or PUT missing handle.
Transport(TransportError)
Wraps TransportError; stream closed, framing error, or Bluetooth I/O fault.
ServerError(u8)
Remote device returned a non-OK response opcode.
UnexpectedEof
Transport stream ended before a complete packet was received.
MessageListing(MessageListingError)
Message listing XML response could not be parsed.
ResponseTooLarge
Response body exceeded the 4 MiB safety ceiling.
InvalidEncoding
Response body is not valid UTF-8.
InvalidMessage(BMessageError)
bMessage body could not be parsed.
MissingHandle
PUT response was OK but contained no Name header; remote did not assign a handle.
InvalidInput(&'static str)
Caller-supplied input violated a MAP protocol constraint.
FolderListing(XmlError)
Folder listing XML response could not be parsed.
Trait Implementations§
Source§impl Error for MapError
impl Error for MapError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<BMessageError> for MapError
impl From<BMessageError> for MapError
Source§fn from(source: BMessageError) -> Self
fn from(source: BMessageError) -> Self
Converts to this type from the input type.
Source§impl From<MessageListingError> for MapError
impl From<MessageListingError> for MapError
Source§fn from(source: MessageListingError) -> Self
fn from(source: MessageListingError) -> Self
Converts to this type from the input type.
Source§impl From<TransportError> for MapError
impl From<TransportError> for MapError
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for MapError
impl !UnwindSafe for MapError
impl Freeze for MapError
impl Send for MapError
impl Sync for MapError
impl Unpin for MapError
impl UnsafeUnpin for MapError
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