pub struct Plex {
pub url: String,
pub token: String,
pub refresh: bool,
pub analyze: bool,
}
Fields§
§url: String
URL to the Plex server
token: String
API token for the Plex server
refresh: bool
Whether to refresh metadata of the file (default: false)
analyze: bool
Whether to analyze the file (default: false)
Implementations§
source§impl Plex
impl Plex
fn get_client(&self) -> Result<Client>
async fn libraries(&self) -> Result<Vec<Library>>
fn in_library( &self, libraries: &Vec<Library>, ev: &ScanEvent, ) -> Result<Option<Library>>
async fn get_item( &self, library: &Library, path: &str, ) -> Result<Option<Metadata>>
async fn refresh_item(&self, key: &str) -> Result<()>
async fn analyze_item(&self, key: &str) -> Result<()>
async fn scan(&self, ev: &ScanEvent, library: &Library) -> Result<()>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Plex
impl<'de> Deserialize<'de> for Plex
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
Auto Trait Implementations§
impl Freeze for Plex
impl RefUnwindSafe for Plex
impl Send for Plex
impl Sync for Plex
impl Unpin for Plex
impl UnwindSafe for Plex
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)