#![allow(unused_imports)] use sendgrid2::SendgridClient; use sendgrid2::model::*; #[tokio::main] async fn main() { let client = SendgridClient::from_env(); let segment_id = "your segment id"; let response = client .delete_contactdb_segments_segment_id(segment_id) .delete_contacts(true) .on_behalf_of("your on behalf of") .send() .await .unwrap(); println!("{:#?}", response); }