pub struct Client { /* private fields */ }Expand description
Async, cheap-to-clone client for the Zammad REST API.
Use Client::builder to construct one. All resource handles
(Client::tickets, Client::users, …) borrow &self so cloning is
rarely needed, but cloning is cheap (one Arc::clone) when you do want
to move the client into a long-lived task.
Implementations§
Source§impl Client
impl Client
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Start a new ClientBuilder.
Sourcepub fn new(url: impl Into<String>, auth: Auth) -> Result<Self>
pub fn new(url: impl Into<String>, auth: Auth) -> Result<Self>
Shorthand for Client::builder().url(...).auth(...).build().
Sourcepub fn base_url(&self) -> &str
pub fn base_url(&self) -> &str
Base URL the client was configured with, without a trailing slash.
Sourcepub fn tickets(&self) -> TicketsApi<'_>
pub fn tickets(&self) -> TicketsApi<'_>
Handle for ticket endpoints.
Sourcepub fn articles(&self) -> ArticlesApi<'_>
pub fn articles(&self) -> ArticlesApi<'_>
Handle for ticket-article (reply / note / email) endpoints.
Sourcepub fn organizations(&self) -> OrganizationsApi<'_>
pub fn organizations(&self) -> OrganizationsApi<'_>
Handle for organization endpoints.
Handle for tag endpoints.
Sourcepub fn priorities(&self) -> PrioritiesApi<'_>
pub fn priorities(&self) -> PrioritiesApi<'_>
Handle for ticket-priority endpoints.
Sourcepub fn knowledge_base(&self) -> KnowledgeBaseApi<'_>
pub fn knowledge_base(&self) -> KnowledgeBaseApi<'_>
Handle for Knowledge Base (FAQ) endpoints.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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