pub enum SearchScope {
All,
Music,
Movies,
Tv,
}Expand description
An opaque search scope the frontend selects; Rust owns what it means.
The expansion table below is Jellyfin domain vocabulary: it changes when
Jellyfin adds or renames an item type, never when the UI is redesigned. It
previously lived in the frontend (searchScope.ts), which is the boundary
leak documented in docs/specs/scoped-search-boundary.md. The frontend now
sends the enum and never names an item type in connection with search.
TRACES: UR-049 | DR-063
Variants§
Implementations§
Source§impl SearchScope
impl SearchScope
Sourcepub fn item_types(self) -> Option<Vec<String>>
pub fn item_types(self) -> Option<Vec<String>>
The Jellyfin item types this scope requests, or None for All.
All returns None rather than the union of every listed type on
purpose: an explicit includeItemTypes list filters out anything not
named in it, so a union would silently drop People, folders and any type
nobody enumerated. Callers must omit the filter entirely on None.
TRACES: UR-049 | DR-063
Sourcepub fn for_collection_type(collection_type: &str) -> Option<SearchScope>
pub fn for_collection_type(collection_type: &str) -> Option<SearchScope>
The scope a library of this Jellyfin CollectionType belongs to, or
None when its contents are not something favourites are browsed by.
Same reasoning as item_types: this table is Jellyfin vocabulary and
changes when Jellyfin renames a collection type, not when the library
page is redesigned — so it lives here rather than in the UI that renders
a per-library favourites tile.
All is never returned: it is the absence of a category, offered
alongside the libraries rather than derived from one.
TRACES: UR-075 | DR-175 | UT-161
Trait Implementations§
Source§impl Clone for SearchScope
impl Clone for SearchScope
Source§fn clone(&self) -> SearchScope
fn clone(&self) -> SearchScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SearchScope
impl Debug for SearchScope
Source§impl<'de> Deserialize<'de> for SearchScope
impl<'de> Deserialize<'de> for SearchScope
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>,
Source§impl NamedType for SearchScope
impl NamedType for SearchScope
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
Source§impl PartialEq for SearchScope
impl PartialEq for SearchScope
Source§fn eq(&self, other: &SearchScope) -> bool
fn eq(&self, other: &SearchScope) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SearchScope
impl Serialize for SearchScope
Source§impl Type for SearchScope
impl Type for SearchScope
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
definition will be put into the type map.impl Copy for SearchScope
impl Eq for SearchScope
impl StructuralPartialEq for SearchScope
Auto Trait Implementations§
impl Freeze for SearchScope
impl RefUnwindSafe for SearchScope
impl Send for SearchScope
impl Sync for SearchScope
impl Unpin for SearchScope
impl UnsafeUnpin for SearchScope
impl UnwindSafe for SearchScope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FunctionArg for Twhere
T: Type,
impl<T> FunctionArg for Twhere
T: Type,
§fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
DataType]. Read more