pub mod client;
pub mod contacts;
pub mod params;
pub mod phonebook;
pub use contacts::normalize_number;
pub use contacts::CardEntry;
pub use contacts::CardListingError;
pub use formats::vcard::{Contact, ContactError};
pub use obex_core::client::ObexError;
pub use obex_core::TransportError;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum PbapError {
#[error("OBEX: {0}")]
Obex(#[from] ObexError),
#[error("transport: {0}")]
Transport(#[from] TransportError),
#[error("server returned error opcode {0:#04x}")]
ServerError(u8),
#[error("unexpected end of stream")]
UnexpectedEof,
#[error("response body too large")]
ResponseTooLarge,
#[error("response body is not UTF-8")]
InvalidEncoding,
#[error("vCard parse error: {0}")]
Contact(#[from] ContactError),
#[error("card listing: {0}")]
CardListing(#[from] CardListingError),
#[error("invalid input: {0}")]
InvalidInput(&'static str),
}