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.
Sourcepub async fn download_cid(
&self,
domain_id: &str,
cid: &str,
) -> Result<Vec<DownloadedPart>, StorageError>
pub async fn download_cid( &self, domain_id: &str, cid: &str, ) -> Result<Vec<DownloadedPart>, StorageError>
Download domain data referenced by a CID, which can be either:
- a bare domain-data ID (UUID), or
- an absolute/relative URL under the domain server.
pub async fn upload_artifact( &self, request: UploadRequest<'_>, ) -> Result<Option<String>, StorageError>
pub async fn upload_artifact_file( &self, request: UploadFileRequest<'_>, ) -> 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§
Auto Trait Implementations§
impl !RefUnwindSafe for DomainClient
impl !UnwindSafe for DomainClient
impl Freeze for DomainClient
impl Send for DomainClient
impl Sync for DomainClient
impl Unpin for DomainClient
impl UnsafeUnpin 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