pub struct TermsClient { /* private fields */ }Expand description
Resource client for term CRUD operations.
Terms use the tagged ValueDto format.
create_term and friends accept features as BTreeMap<String, ValueDto> —
use Value builders or plain .into() conversions to populate the map.
Implementations§
Source§impl TermsClient
impl TermsClient
Sourcepub async fn create_term(
&self,
request: CreateTermRequest,
options: Option<&RequestOptions>,
) -> Result<TermResponse, Error>
pub async fn create_term( &self, request: CreateTermRequest, options: Option<&RequestOptions>, ) -> Result<TermResponse, Error>
Create a new term.
Sourcepub async fn get_term(
&self,
term_id: &str,
options: Option<&RequestOptions>,
) -> Result<TermResponse, Error>
pub async fn get_term( &self, term_id: &str, options: Option<&RequestOptions>, ) -> Result<TermResponse, Error>
Get a term by ID.
Sourcepub async fn update_term(
&self,
term_id: &str,
request: UpdateTermRequest,
options: Option<&RequestOptions>,
) -> Result<TermResponse, Error>
pub async fn update_term( &self, term_id: &str, request: UpdateTermRequest, options: Option<&RequestOptions>, ) -> Result<TermResponse, Error>
Update an existing term.
Sourcepub async fn delete_term(
&self,
term_id: &str,
options: Option<&RequestOptions>,
) -> Result<(), Error>
pub async fn delete_term( &self, term_id: &str, options: Option<&RequestOptions>, ) -> Result<(), Error>
Delete a term by ID.
Sourcepub async fn term_exists(
&self,
term_id: &str,
options: Option<&RequestOptions>,
) -> Result<bool, Error>
pub async fn term_exists( &self, term_id: &str, options: Option<&RequestOptions>, ) -> Result<bool, Error>
Check if a term exists.
Returns Ok(false) on 404; any other error is propagated.
Sourcepub async fn bulk_create_terms(
&self,
request: BulkAddTermsRequest,
options: Option<&RequestOptions>,
) -> Result<BulkAddTermsResponse, Error>
pub async fn bulk_create_terms( &self, request: BulkAddTermsRequest, options: Option<&RequestOptions>, ) -> Result<BulkAddTermsResponse, Error>
Bulk-create terms.
Sourcepub async fn list_terms(
&self,
options: Option<&RequestOptions>,
) -> Result<TermListResponse, Error>
pub async fn list_terms( &self, options: Option<&RequestOptions>, ) -> Result<TermListResponse, Error>
List all terms for the authenticated tenant.
Sourcepub async fn clear_terms(
&self,
options: Option<&RequestOptions>,
) -> Result<ClearTermsResponse, Error>
pub async fn clear_terms( &self, options: Option<&RequestOptions>, ) -> Result<ClearTermsResponse, Error>
Clear all terms for the authenticated tenant.
Sourcepub async fn create_many(
&self,
request: BulkAddTermsRequest,
options: Option<&RequestOptions>,
) -> Result<BulkAddTermsResponse, Error>
pub async fn create_many( &self, request: BulkAddTermsRequest, options: Option<&RequestOptions>, ) -> Result<BulkAddTermsResponse, Error>
Alias for TermsClient::bulk_create_terms, mirroring the TS SDK’s createMany.
Trait Implementations§
Source§impl Clone for TermsClient
impl Clone for TermsClient
Source§fn clone(&self) -> TermsClient
fn clone(&self) -> TermsClient
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 TermsClient
impl !RefUnwindSafe for TermsClient
impl Send for TermsClient
impl Sync for TermsClient
impl Unpin for TermsClient
impl UnsafeUnpin for TermsClient
impl !UnwindSafe for TermsClient
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