pub enum PbapError {
Obex(ObexError),
Transport(TransportError),
ServerError(u8),
UnexpectedEof,
ResponseTooLarge,
InvalidEncoding,
Contact(ContactError),
CardListing(CardListingError),
InvalidInput(&'static str),
}Expand description
PBAP client errors — OBEX, transport, server response, vCard parse, XML listing parse, and input validation.
Variants§
Obex(ObexError)
Connection state violation, packet codec failure, or server rejection.
Transport(TransportError)
Framing error or OS-level socket failure.
ServerError(u8)
Remote device returned a non-OK response opcode; inner byte is the opcode.
UnexpectedEof
Transport stream ended before a complete packet was received.
ResponseTooLarge
Response body exceeded the 4 MiB safety ceiling.
InvalidEncoding
Response body is not valid UTF-8; cannot parse as vCard text.
Contact(ContactError)
calcard failed to parse a vCard in the response body.
CardListing(CardListingError)
Remote vCard-listing XML was malformed or a <card> element lacked the required handle attribute.
InvalidInput(&'static str)
A user-supplied parameter failed wire-format validation; inner message names the violated constraint.
Trait Implementations§
Source§impl Error for PbapError
impl Error for PbapError
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<CardListingError> for PbapError
impl From<CardListingError> for PbapError
Source§fn from(source: CardListingError) -> Self
fn from(source: CardListingError) -> Self
Converts to this type from the input type.
Source§impl From<ContactError> for PbapError
impl From<ContactError> for PbapError
Source§fn from(source: ContactError) -> Self
fn from(source: ContactError) -> Self
Converts to this type from the input type.
Source§impl From<TransportError> for PbapError
impl From<TransportError> for PbapError
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 PbapError
impl !UnwindSafe for PbapError
impl Freeze for PbapError
impl Send for PbapError
impl Sync for PbapError
impl Unpin for PbapError
impl UnsafeUnpin for PbapError
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