pub struct PhonebookResource { /* private fields */ }Expand description
Phonebook entries — /api/v2/phonebook.
Implementations§
Source§impl PhonebookResource
impl PhonebookResource
Sourcepub async fn list_all(&self) -> Result<Vec<PhonebookEntry>, ManagerError>
pub async fn list_all(&self) -> Result<Vec<PhonebookEntry>, ManagerError>
List all phonebook entries (auto-paginated).
Sourcepub async fn create(
&self,
body: RestCreatePhonebookEntry,
) -> Result<PhonebookEntryItemResponse, ManagerError>
pub async fn create( &self, body: RestCreatePhonebookEntry, ) -> Result<PhonebookEntryItemResponse, ManagerError>
Create a phonebook entry.
Sourcepub async fn get(
&self,
id: &str,
) -> Result<PhonebookEntryItemResponse, ManagerError>
pub async fn get( &self, id: &str, ) -> Result<PhonebookEntryItemResponse, ManagerError>
Get a phonebook entry by id.
Sourcepub async fn update(
&self,
id: &str,
body: RestUpdatePhonebookEntry,
) -> Result<PhonebookEntryItemResponse, ManagerError>
pub async fn update( &self, id: &str, body: RestUpdatePhonebookEntry, ) -> Result<PhonebookEntryItemResponse, ManagerError>
Update a phonebook entry.
Sourcepub async fn download(&self) -> Result<String, ManagerError>
pub async fn download(&self) -> Result<String, ManagerError>
Download all phonebook entries as CSV text.
Sourcepub async fn upload(
&self,
file: PathBuf,
overwrite: bool,
) -> Result<(), ManagerError>
pub async fn upload( &self, file: PathBuf, overwrite: bool, ) -> Result<(), ManagerError>
Bulk-upload phonebook entries from a CSV file. overwrite replaces existing entries.
Sourcepub async fn bulk_delete(
&self,
ids: Vec<String>,
) -> Result<DefaultV2MessageResponse, ManagerError>
pub async fn bulk_delete( &self, ids: Vec<String>, ) -> Result<DefaultV2MessageResponse, ManagerError>
Bulk-delete phonebook entries by id.
Auto Trait Implementations§
impl !RefUnwindSafe for PhonebookResource
impl !UnwindSafe for PhonebookResource
impl Freeze for PhonebookResource
impl Send for PhonebookResource
impl Sync for PhonebookResource
impl Unpin for PhonebookResource
impl UnsafeUnpin for PhonebookResource
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