pub enum PeerReply {
Show 16 variants
Info(PeerInfo),
Paired(Paired),
Refused {
reason: PairingRefused,
},
Done,
Libraries {
libraries: Vec<SharedLibrary>,
name: Option<String>,
},
Page(SyncPage),
Artwork {
content_type: String,
bytes: Vec<u8>,
},
NotShared,
NotFound,
Unavailable,
Token(TokenGranted),
AssertionRefused {
reason: AssertionRefused,
},
SubtitleResults {
search: SubtitleSearch,
},
SubtitleDownloaded {
downloaded: SubtitleDownloaded,
},
Failed {
error: Error,
},
Unknown,
}Expand description
The answer to a PeerRequest.
Variants§
Info(PeerInfo)
Paired(Paired)
Refused
Fields
§
reason: PairingRefusedDone
Libraries
The libraries shared with the pair, at most
MAX_SHARED_LIBRARIES.
Fields
§
libraries: Vec<SharedLibrary>Page(SyncPage)
A page of a SyncLibrary’s answer.
Artwork
An image: at most MAX_ARTWORK_BYTES.
The library, or the item the image is of, is not shared with the pair (now, or any more): a cache of it goes.
NotFound
Shared, but the item or image is not there now.
The sharing server cannot answer now (its catalog is down): the asker keeps what it has and asks again later.
Token(TokenGranted)
The token for an AssertUser.
AssertionRefused
No token for an AssertUser, and why.
Fields
§
reason: AssertionRefusedSubtitleResults
A subtitle search’s results.
Fields
§
search: SubtitleSearchSubtitleDownloaded
A subtitle downloaded.
Fields
§
downloaded: SubtitleDownloadedFailed
A subtitle ask refused, as the client protocol would refuse it: the home server passes it on to its device as it is.
Unknown
A reply this build does not know.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PeerReply
impl<'de> Deserialize<'de> for PeerReply
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PeerReply
impl StructuralPartialEq for PeerReply
Auto Trait Implementations§
impl Freeze for PeerReply
impl RefUnwindSafe for PeerReply
impl Send for PeerReply
impl Sync for PeerReply
impl Unpin for PeerReply
impl UnsafeUnpin for PeerReply
impl UnwindSafe for PeerReply
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