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) -> PbapError
fn from(source: CardListingError) -> PbapError
Converts to this type from the input type.
Source§impl From<ContactError> for PbapError
impl From<ContactError> for PbapError
Source§fn from(source: ContactError) -> PbapError
fn from(source: ContactError) -> PbapError
Converts to this type from the input type.
Source§impl From<PbapError> for SessionError
impl From<PbapError> for SessionError
Source§impl From<TransportError> for PbapError
impl From<TransportError> for PbapError
Source§fn from(source: TransportError) -> PbapError
fn from(source: TransportError) -> PbapError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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