pub struct SegmentsSvc(/* private fields */);Expand description
Resend APIs for /segments endpoints.
Implementations§
Source§impl SegmentsSvc
impl SegmentsSvc
Sourcepub async fn create(&self, name: &str) -> Result<CreateSegmentResponse>
pub async fn create(&self, name: &str) -> Result<CreateSegmentResponse>
Create a new segment for contacts to be added to.
Returns an id of a created segment.
https://resend.com/docs/api-reference/segments/create-segment
Sourcepub async fn delete(&self, id: &str) -> Result<bool>
pub async fn delete(&self, id: &str) -> Result<bool>
Remove an existing segment.
https://resend.com/docs/api-reference/segments/delete-segment
Sourcepub async fn list<T>(
&self,
list_opts: ListOptions<T>,
) -> Result<ListResponse<Segment>>
pub async fn list<T>( &self, list_opts: ListOptions<T>, ) -> Result<ListResponse<Segment>>
Retrieve a list of segments.
- Default limit: no limit (return everything)
https://resend.com/docs/api-reference/segments/list-segments
Trait Implementations§
Source§impl Clone for SegmentsSvc
impl Clone for SegmentsSvc
Source§fn clone(&self) -> SegmentsSvc
fn clone(&self) -> SegmentsSvc
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 moreAuto Trait Implementations§
impl Freeze for SegmentsSvc
impl !RefUnwindSafe for SegmentsSvc
impl Send for SegmentsSvc
impl Sync for SegmentsSvc
impl Unpin for SegmentsSvc
impl !UnwindSafe for SegmentsSvc
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