pub struct Client { /* private fields */ }Implementations§
source§impl Client
impl Client
pub fn new(agent: Arc<Agent>, bucket: Principal) -> Client
pub fn set_chunk_size(&mut self, chunk_size: u32)
pub fn set_concurrency(&mut self, concurrency: u8)
sourcepub async fn admin_set_managers(
&self,
args: BTreeSet<Principal>,
) -> Result<(), String>
pub async fn admin_set_managers( &self, args: BTreeSet<Principal>, ) -> Result<(), String>
the caller of agent should be canister controller
sourcepub async fn admin_set_auditors(
&self,
args: BTreeSet<Principal>,
) -> Result<(), String>
pub async fn admin_set_auditors( &self, args: BTreeSet<Principal>, ) -> Result<(), String>
the caller of agent should be canister controller
sourcepub async fn admin_update_bucket(
&self,
args: UpdateBucketInput,
) -> Result<(), String>
pub async fn admin_update_bucket( &self, args: UpdateBucketInput, ) -> Result<(), String>
the caller of agent should be canister controller
pub async fn get_bucket_info(&self) -> Result<BucketInfo, String>
pub async fn get_file_info(&self, id: u32) -> Result<FileInfo, String>
pub async fn get_file_info_by_hash( &self, hash: ByteN<32>, ) -> Result<FileInfo, String>
pub async fn get_file_ancestors( &self, id: u32, ) -> Result<Vec<FolderName>, String>
pub async fn get_file_chunks( &self, id: u32, index: u32, take: Option<u32>, ) -> Result<Vec<FileChunk>, String>
pub async fn list_files( &self, parent: u32, prev: Option<u32>, take: Option<u32>, ) -> Result<Vec<FileInfo>, String>
pub async fn get_folder_info(&self, id: u32) -> Result<FolderInfo, String>
pub async fn get_folder_ancestors( &self, id: u32, ) -> Result<Vec<FolderName>, String>
pub async fn list_folders(&self, parent: u32) -> Result<Vec<FolderInfo>, String>
pub async fn create_file( &self, file: CreateFileInput, ) -> Result<CreateFileOutput, String>
pub async fn update_file_chunk( &self, input: UpdateFileChunkInput, ) -> Result<UpdateFileChunkOutput, String>
pub async fn update_file_info( &self, input: UpdateFileInput, ) -> Result<UpdateFileOutput, String>
pub async fn move_file( &self, input: MoveInput, ) -> Result<UpdateFileOutput, String>
pub async fn delete_file(&self, id: u32) -> Result<bool, String>
pub async fn batch_delete_subfiles( &self, parent: u32, ids: BTreeSet<u32>, ) -> Result<Vec<u32>, String>
pub async fn create_folder( &self, input: CreateFolderInput, ) -> Result<CreateFolderOutput, String>
pub async fn update_folder_info( &self, input: UpdateFolderInput, ) -> Result<UpdateFolderOutput, String>
pub async fn move_folder( &self, input: MoveInput, ) -> Result<UpdateFolderOutput, String>
pub async fn delete_folder(&self, id: u32) -> Result<bool, String>
pub async fn upload<T, F>( &self, ar: T, file: CreateFileInput, progress: F, ) -> Result<UploadFileChunksResult, String>
pub async fn upload_chunks<T, F>( &self, ar: T, id: u32, exclude_chunks: &BTreeSet<u32>, progress: F, ) -> UploadFileChunksResult
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)