pub struct Filters<'a> { /* private fields */ }
Expand description
API functions related to filters.
Implementations§
source§impl<'a> Filters<'a>
impl<'a> Filters<'a>
sourcepub async fn list_kinds(&self) -> Result<Vec<String>>
pub async fn list_kinds(&self) -> Result<Vec<String>>
Gets an array of all available source filter kinds.
sourcepub async fn list(&self, source: SourceId<'_>) -> Result<Vec<SourceFilter>>
pub async fn list(&self, source: SourceId<'_>) -> Result<Vec<SourceFilter>>
Gets an array of all of a source’s filters.
sourcepub async fn default_settings<T>(&self, kind: &str) -> Result<T>where
T: DeserializeOwned,
pub async fn default_settings<T>(&self, kind: &str) -> Result<T>where
T: DeserializeOwned,
Gets the default settings for a filter kind.
sourcepub async fn create<T>(&self, filter: Create<'_, T>) -> Result<()>where
T: Serialize,
pub async fn create<T>(&self, filter: Create<'_, T>) -> Result<()>where
T: Serialize,
Creates a new filter, adding it to the specified source.
sourcepub async fn remove(&self, source: SourceId<'_>, filter: &str) -> Result<()>
pub async fn remove(&self, source: SourceId<'_>, filter: &str) -> Result<()>
Removes a filter from a source.
sourcepub async fn set_name(&self, name: SetName<'_>) -> Result<()>
pub async fn set_name(&self, name: SetName<'_>) -> Result<()>
Sets the name of a source filter (rename).
sourcepub async fn get(
&self,
source: SourceId<'_>,
filter: &str
) -> Result<SourceFilter>
pub async fn get( &self, source: SourceId<'_>, filter: &str ) -> Result<SourceFilter>
Gets the info for a specific source filter.
sourcepub async fn set_index(&self, index: SetIndex<'_>) -> Result<()>
pub async fn set_index(&self, index: SetIndex<'_>) -> Result<()>
Sets the index position of a filter on a source.
sourcepub async fn set_settings<T>(&self, settings: SetSettings<'_, T>) -> Result<()>where
T: Serialize,
pub async fn set_settings<T>(&self, settings: SetSettings<'_, T>) -> Result<()>where
T: Serialize,
Sets the settings of a source filter.
sourcepub async fn set_enabled(&self, enabled: SetEnabled<'_>) -> Result<()>
pub async fn set_enabled(&self, enabled: SetEnabled<'_>) -> Result<()>
Sets the enable state of a source filter.
Auto Trait Implementations§
impl<'a> Freeze for Filters<'a>
impl<'a> !RefUnwindSafe for Filters<'a>
impl<'a> Send for Filters<'a>
impl<'a> Sync for Filters<'a>
impl<'a> Unpin for Filters<'a>
impl<'a> !UnwindSafe for Filters<'a>
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