pub struct FiltersHandler<'a> { /* private fields */ }Expand description
Handler for content filter API endpoints.
Implementations§
Source§impl<'a> FiltersHandler<'a>
impl<'a> FiltersHandler<'a>
Sourcepub fn new(client: &'a MastodonClient) -> Self
pub fn new(client: &'a MastodonClient) -> Self
Creates a new FiltersHandler for the given client.
Parameters:
client: The client to use for making requests.
Returns:
FiltersHandler: The created filters handler.
Sourcepub async fn list(&self) -> Result<Vec<Filter>>
pub async fn list(&self) -> Result<Vec<Filter>>
Fetches all content filters for the authenticated user.
Returns:
Result<Vec<Filter>>: The fetched filters.
Corresponds to GET /api/v1/filters.
Sourcepub async fn create(&self, params: &CreateFilterParams) -> Result<Filter>
pub async fn create(&self, params: &CreateFilterParams) -> Result<Filter>
Creates a new content filter.
Parameters:
params: The parameters for the filter to create.
Returns:
Result<Filter>: The created filter.
Corresponds to POST /api/v1/filters.
Auto Trait Implementations§
impl<'a> Freeze for FiltersHandler<'a>
impl<'a> !RefUnwindSafe for FiltersHandler<'a>
impl<'a> Send for FiltersHandler<'a>
impl<'a> Sync for FiltersHandler<'a>
impl<'a> Unpin for FiltersHandler<'a>
impl<'a> !UnwindSafe for FiltersHandler<'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