Skip to main content

msnp11_sdk/errors/
p2p_error.rs

1/// Errors when using P2P features like display picture transfers.
2#[derive(Debug, thiserror::Error)]
3#[cfg_attr(feature = "uniffi", derive(uniffi::Error))]
4pub enum P2pError {
5    #[error("P2P session kind not supported")]
6    P2pInvite,
7    #[error("Invite is for a different user")]
8    OtherDestination,
9    #[error("Could get session data")]
10    CouldNotGetSessionData,
11    #[error("Invite has an invalid context")]
12    OtherContext,
13    #[error("Could not read binary header from P2P message")]
14    BinaryHeaderReadingError,
15    #[error("Message could not be delivered to all recipients")]
16    MessageNotDelivered,
17    #[error("Please log in before using this command")]
18    NotLoggedIn,
19    #[error("Error transmitting data")]
20    TransmittingError,
21    #[error("Error receiving data")]
22    ReceivingError,
23    #[error("P2P session kind not supported")]
24    InviteError,
25    #[error("Could not retrieve user data")]
26    CouldNotGetUserData,
27    #[error("Could not get contact display picture")]
28    CouldNotGetDisplayPicture,
29}