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