1pub mod client;
4pub mod contacts;
5pub mod metadata;
6pub mod params;
7pub mod phonebook;
8
9pub use contacts::CardEntry;
10pub use contacts::CardListingError;
11pub use formats::vcard::{Contact, ContactError};
12pub use metadata::PhonebookMetadata;
13pub use obex_core::client::ObexError;
14pub use obex_core::TransportError;
15
16use thiserror::Error;
17
18#[derive(Debug, Error)]
20pub enum PbapError {
21 #[error("OBEX: {0}")]
23 Obex(#[from] ObexError),
24 #[error("transport: {0}")]
26 Transport(#[from] TransportError),
27 #[error("server returned error opcode {0:#04x}")]
29 ServerError(u8),
30 #[error("unexpected end of stream")]
32 UnexpectedEof,
33 #[error("response body too large")]
35 ResponseTooLarge,
36 #[error("response body is not UTF-8")]
38 InvalidEncoding,
39 #[error("vCard parse error: {0}")]
41 Contact(#[from] ContactError),
42 #[error("card listing: {0}")]
44 CardListing(#[from] CardListingError),
45 #[error("invalid input: {0}")]
47 InvalidInput(&'static str),
48}