#[non_exhaustive]pub enum ServerEvent {
Show 22 variants
Library(LibrarySocketMessage),
LibraryStatus(LibraryStatusMessage),
Medias(MediasMessage),
UploadProgress(UploadProgressMessage),
ConvertProgress(ConvertMessage),
Episodes(EpisodesMessage),
Series(SeriesMessage),
Movies(MoviesMessage),
Books(BooksMessage),
People(PeopleMessage),
Tags(TagMessage),
Channels(ChannelMessage),
Backups(Box<BackupMessage>),
BackupsFiles(BackupFileProgress),
Watched(Watched),
Unwatched(Unwatched),
ViewProgress(ViewProgress),
RequestProcessing(RequestProcessingMessage),
MediaProgress(MediasProgressMessage),
MediaRating(MediasRatingMessage),
EmbeddingProgress(EmbeddingProgressMessage),
Other {
name: String,
data: Value,
},
}Expand description
An event of the server’s /sse stream.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Library(LibrarySocketMessage)
library: the library as the user sees it, like
crate::ServerApi::get_libraries gives it.
LibraryStatus(LibraryStatusMessage)
library-status.
Medias(MediasMessage)
medias.
UploadProgress(UploadProgressMessage)
upload_progress.
ConvertProgress(ConvertMessage)
convert_progress.
Episodes(EpisodesMessage)
episodes.
Series(SeriesMessage)
series.
Movies(MoviesMessage)
movies.
Books(BooksMessage)
books.
People(PeopleMessage)
people.
Tags(TagMessage)
tags.
Channels(ChannelMessage)
channels.
Backups(Box<BackupMessage>)
backups. Boxed: the largest payload by far.
BackupsFiles(BackupFileProgress)
backups-files.
Watched(Watched)
watched.
Unwatched(Unwatched)
unwatched.
ViewProgress(ViewProgress)
view_progress.
RequestProcessing(RequestProcessingMessage)
request_processing.
MediaProgress(MediasProgressMessage)
media_progress: a user’s playback position in a media changed.
MediaRating(MediasRatingMessage)
media_rating: a user’s rating of a media (or another element) changed.
EmbeddingProgress(EmbeddingProgressMessage)
embedding_progress: a background embedding pass over a library advanced.
Other
Any other event, with its payload unwrapped but not typed: events newer than this crate.
Implementations§
Source§impl ServerEvent
impl ServerEvent
Sourcepub fn library_id(&self) -> Option<&str>
pub fn library_id(&self) -> Option<&str>
The library the event is about, when it is about one.
Trait Implementations§
Source§impl Clone for ServerEvent
impl Clone for ServerEvent
Auto Trait Implementations§
impl Forget for ServerEvent
impl Freeze for ServerEventwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<UserMapping>: Freeze,
PhantomData<LibraryRole>: Freeze,
PhantomData<MediaWithAction>: Freeze,
PhantomData<VideoTextOverlay>: Freeze,
PhantomData<VideoConvertInterval>: Freeze,
PhantomData<EpisodeWithAction>: Freeze,
PhantomData<SerieWithAction>: Freeze,
PhantomData<MovieWithAction>: Freeze,
PhantomData<BookWithAction>: Freeze,
PhantomData<PersonWithAction>: Freeze,
PhantomData<TagWithAction>: Freeze,
PhantomData<ChannelWithAction>: Freeze,
*const BackupMessage is !null: Freeze,
PhantomData<BackupMessage>: Freeze,
PhantomData<String>: Freeze,
PhantomData<RequestProcessingWithAction>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
impl Move for ServerEvent
impl RefUnwindSafe for ServerEvent
impl Send for ServerEvent
impl Sync for ServerEvent
impl Unpin for ServerEvent
impl UnsafeUnpin for ServerEventwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<UserMapping>: UnsafeUnpin,
PhantomData<LibraryRole>: UnsafeUnpin,
PhantomData<MediaWithAction>: UnsafeUnpin,
PhantomData<VideoTextOverlay>: UnsafeUnpin,
PhantomData<VideoConvertInterval>: UnsafeUnpin,
PhantomData<EpisodeWithAction>: UnsafeUnpin,
PhantomData<SerieWithAction>: UnsafeUnpin,
PhantomData<MovieWithAction>: UnsafeUnpin,
PhantomData<BookWithAction>: UnsafeUnpin,
PhantomData<PersonWithAction>: UnsafeUnpin,
PhantomData<TagWithAction>: UnsafeUnpin,
PhantomData<ChannelWithAction>: UnsafeUnpin,
*const BackupMessage is !null: UnsafeUnpin,
PhantomData<BackupMessage>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<RequestProcessingWithAction>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for ServerEventwhere
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
BoxRaw<BackupMessage>: UnwindSafe,
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