pub struct DomainClient {
pub base: Url,
pub token: TokenRef,
/* private fields */
}Expand description
Domain server HTTP client (skeleton; HTTP added later).
Fields§
§base: Url§token: TokenRefImplementations§
Source§impl DomainClient
impl DomainClient
pub fn new(base: Url, token: TokenRef) -> Result<Self>
pub fn with_timeout( base: Url, token: TokenRef, timeout: Duration, ) -> Result<Self>
Sourcepub async fn download_uri(
&self,
uri: &str,
) -> Result<Vec<DownloadedPart>, StorageError>
pub async fn download_uri( &self, uri: &str, ) -> Result<Vec<DownloadedPart>, StorageError>
Download a Domain data item referenced by an absolute URI, persisting each multipart part into a temporary file and returning its metadata.
pub async fn upload_artifact( &self, request: UploadRequest<'_>, ) -> Result<Option<String>, StorageError>
pub async fn find_artifact_id( &self, domain_id: &str, name: &str, data_type: &str, ) -> Result<Option<String>, StorageError>
Trait Implementations§
Source§impl Clone for DomainClient
impl Clone for DomainClient
Source§fn clone(&self) -> DomainClient
fn clone(&self) -> DomainClient
Returns a duplicate of the value. Read more
1.0.0 · 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 DomainClient
impl !RefUnwindSafe for DomainClient
impl Send for DomainClient
impl Sync for DomainClient
impl Unpin for DomainClient
impl !UnwindSafe for DomainClient
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