pub struct AddFilterRequest { /* private fields */ }
Expand description
Data structure for the MastodonClient::add_filter method Form used to create a filter
§Example
use elefren::{entities::filter::FilterContext, requests::AddFilterRequest};
let request = AddFilterRequest::new("foo", FilterContext::Home);
Implementations§
Source§impl AddFilterRequest
impl AddFilterRequest
Sourcepub fn new(phrase: &str, context: FilterContext) -> AddFilterRequest
pub fn new(phrase: &str, context: FilterContext) -> AddFilterRequest
Create a new AddFilterRequest
Sourcepub fn irreversible(&mut self) -> &mut Self
pub fn irreversible(&mut self) -> &mut Self
Set irreversible
to true
Sourcepub fn whole_word(&mut self) -> &mut Self
pub fn whole_word(&mut self) -> &mut Self
Set whole_word
to true
Sourcepub fn expires_in(&mut self, d: Duration) -> &mut Self
pub fn expires_in(&mut self, d: Duration) -> &mut Self
Set expires_in
to a duration
Trait Implementations§
Source§impl Clone for AddFilterRequest
impl Clone for AddFilterRequest
Source§fn clone(&self) -> AddFilterRequest
fn clone(&self) -> AddFilterRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for AddFilterRequest
impl Debug for AddFilterRequest
Source§impl PartialEq for AddFilterRequest
impl PartialEq for AddFilterRequest
Source§impl Serialize for AddFilterRequest
impl Serialize for AddFilterRequest
impl StructuralPartialEq for AddFilterRequest
Auto Trait Implementations§
impl Freeze for AddFilterRequest
impl RefUnwindSafe for AddFilterRequest
impl Send for AddFilterRequest
impl Sync for AddFilterRequest
impl Unpin for AddFilterRequest
impl UnwindSafe for AddFilterRequest
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more