pub struct ContactHandles {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl ContactHandles
impl ContactHandles
Sourcepub async fn add<'a>(
&'a self,
contact_id: &'a str,
body: &ContactHandle,
) -> Result<(), Error>
pub async fn add<'a>( &'a self, contact_id: &'a str, body: &ContactHandle, ) -> Result<(), Error>
Add contact handle
Adds a new handle to a contact.
Parameters:
contact_id: &'astr: The contact ID (required)
async fn example_contact_handles_add() -> anyhow::Result<()> {
let client = front_api::Client::new_from_env();
client
.contact_handles()
.add(
"some-string",
&front_api::types::ContactHandle {
handle: "some-string".to_string(),
source: front_api::types::Source::Custom,
},
)
.await?;
Ok(())
}Sourcepub async fn delete<'a>(
&'a self,
contact_id: &'a str,
body: &DeleteContactHandle,
) -> Result<(), Error>
pub async fn delete<'a>( &'a self, contact_id: &'a str, body: &DeleteContactHandle, ) -> Result<(), Error>
Delete contact handle
Remove a handle from a contact.
Parameters:
contact_id: &'astr: The contact ID (required)
async fn example_contact_handles_delete() -> anyhow::Result<()> {
let client = front_api::Client::new_from_env();
client
.contact_handles()
.delete(
"some-string",
&front_api::types::DeleteContactHandle {
handle: "some-string".to_string(),
source: front_api::types::Source::Custom,
force: Some(true),
},
)
.await?;
Ok(())
}Trait Implementations§
Source§impl Clone for ContactHandles
impl Clone for ContactHandles
Source§fn clone(&self) -> ContactHandles
fn clone(&self) -> ContactHandles
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContactHandles
impl !RefUnwindSafe for ContactHandles
impl Send for ContactHandles
impl Sync for ContactHandles
impl Unpin for ContactHandles
impl UnsafeUnpin for ContactHandles
impl !UnwindSafe for ContactHandles
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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