pub struct JellyfinSDK { /* private fields */ }
Expand description
Main structure representing the Jellyfin instance.
Must be used to interact with Jellyfin server across different ways:
- API calls
- Servers discovery
- WebSockets calls
Implementations§
Source§impl JellyfinSDK
impl JellyfinSDK
Sourcepub fn create_api<S: Into<String>>(&mut self, base_addr: S, token: Option<&str>)
pub fn create_api<S: Into<String>>(&mut self, base_addr: S, token: Option<&str>)
Creates a new JellyfinAPI
instance.
Sourcepub fn get_api(&self) -> JellyfinSDKResult<&JellyfinAPI>
pub fn get_api(&self) -> JellyfinSDKResult<&JellyfinAPI>
Tries getting the JellyfinAPI
instance.
Returns an JellyfinSDKError
if no JellyfinAPI
has been initialized before calling this method.
Sourcepub fn get_api_unchecked(&self) -> &JellyfinAPI
pub fn get_api_unchecked(&self) -> &JellyfinAPI
Force getting the JellyfinAPI
instance.
Must be used carefully. Panics if no instance has been initialized before calling this method.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JellyfinSDK
impl !RefUnwindSafe for JellyfinSDK
impl Send for JellyfinSDK
impl Sync for JellyfinSDK
impl Unpin for JellyfinSDK
impl !UnwindSafe for JellyfinSDK
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