pub struct Suppressions { /* private fields */ }Expand description
Operations on the /suppressions endpoints. Entries key on (email, topic).
Implementations§
Source§impl Suppressions
impl Suppressions
Sourcepub async fn list(&self, params: SuppressionListParams) -> Result<Page>
pub async fn list(&self, params: SuppressionListParams) -> Result<Page>
List the team’s suppressions, newest-first. Expired rows are filtered out.
Sourcepub async fn list_all(
&self,
params: SuppressionListParams,
) -> Result<Vec<Response>>
pub async fn list_all( &self, params: SuppressionListParams, ) -> Result<Vec<Response>>
List every suppression, walking all pages.
Sourcepub async fn create(&self, body: impl Serialize) -> Result<Response>
pub async fn create(&self, body: impl Serialize) -> Result<Response>
Add a manual suppression. Defaults to topic * (every topic). Raises
validation_error if an active entry for the same (email, topic) exists.
Sourcepub async fn get(&self, email: &str, topic: &str) -> Result<Response>
pub async fn get(&self, email: &str, topic: &str) -> Result<Response>
Retrieve the suppression for an (email, topic) pair. Use * as the
topic for the global row.
Sourcepub async fn delete(&self, email: &str, topic: &str) -> Result<()>
pub async fn delete(&self, email: &str, topic: &str) -> Result<()>
Remove the single (email, topic) row. Other topics are untouched.
Sourcepub async fn list_for_email(&self, email: &str) -> Result<Vec<Response>>
pub async fn list_for_email(&self, email: &str) -> Result<Vec<Response>>
List every suppression on file for an address, across all topics. Raises
not_found if the address has no active suppressions.
Sourcepub async fn delete_for_email(&self, email: &str) -> Result<()>
pub async fn delete_for_email(&self, email: &str) -> Result<()>
Remove an address from the suppression list across every topic.
Auto Trait Implementations§
impl !RefUnwindSafe for Suppressions
impl !UnwindSafe for Suppressions
impl Freeze for Suppressions
impl Send for Suppressions
impl Sync for Suppressions
impl Unpin for Suppressions
impl UnsafeUnpin for Suppressions
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