pub trait NeoFSService {
Show 14 methods
// Required methods
fn create_container<'life0, 'life1, 'async_trait>(
&'life0 self,
container: &'life1 Container,
) -> Pin<Box<dyn Future<Output = NeoFSResult<ContainerId>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Container>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_containers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Vec<ContainerId>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn put_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
object: &'life2 Object,
) -> Pin<Box<dyn Future<Output = NeoFSResult<ObjectId>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
object_id: &'life2 ObjectId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Object>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn list_objects<'life0, 'life1, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Vec<ObjectId>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
object_id: &'life2 ObjectId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn create_bearer_token<'life0, 'life1, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
permissions: Vec<AccessPermission>,
expires_sec: u64,
) -> Pin<Box<dyn Future<Output = NeoFSResult<BearerToken>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_session_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = NeoFSResult<SessionToken>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn initiate_multipart_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
object: &'life2 Object,
) -> Pin<Box<dyn Future<Output = NeoFSResult<MultipartUpload>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn upload_part<'life0, 'life1, 'async_trait>(
&'life0 self,
upload: &'life1 MultipartUpload,
part_number: u32,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Part>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn complete_multipart_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
upload: &'life1 MultipartUpload,
parts: Vec<Part>,
) -> Pin<Box<dyn Future<Output = NeoFSResult<MultipartUploadResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn abort_multipart_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
upload: &'life1 MultipartUpload,
) -> Pin<Box<dyn Future<Output = NeoFSResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Service trait for interacting with NeoFS
Required Methods§
Sourcefn create_container<'life0, 'life1, 'async_trait>(
&'life0 self,
container: &'life1 Container,
) -> Pin<Box<dyn Future<Output = NeoFSResult<ContainerId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_container<'life0, 'life1, 'async_trait>(
&'life0 self,
container: &'life1 Container,
) -> Pin<Box<dyn Future<Output = NeoFSResult<ContainerId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates a new container in NeoFS
Sourcefn get_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Container>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Container>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Gets a container by its ID
Sourcefn list_containers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Vec<ContainerId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_containers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Vec<ContainerId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists all containers owned by the current account
Sourcefn delete_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Deletes a container by its ID
Sourcefn put_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
object: &'life2 Object,
) -> Pin<Box<dyn Future<Output = NeoFSResult<ObjectId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
object: &'life2 Object,
) -> Pin<Box<dyn Future<Output = NeoFSResult<ObjectId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Uploads an object to a container
Sourcefn get_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
object_id: &'life2 ObjectId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Object>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
object_id: &'life2 ObjectId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Object>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Gets an object by its ID from a container
Sourcefn list_objects<'life0, 'life1, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Vec<ObjectId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_objects<'life0, 'life1, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Vec<ObjectId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Lists all objects in a container
Sourcefn delete_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
object_id: &'life2 ObjectId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_object<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
object_id: &'life2 ObjectId,
) -> Pin<Box<dyn Future<Output = NeoFSResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deletes an object by its ID from a container
Sourcefn create_bearer_token<'life0, 'life1, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
permissions: Vec<AccessPermission>,
expires_sec: u64,
) -> Pin<Box<dyn Future<Output = NeoFSResult<BearerToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_bearer_token<'life0, 'life1, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
permissions: Vec<AccessPermission>,
expires_sec: u64,
) -> Pin<Box<dyn Future<Output = NeoFSResult<BearerToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Creates a bearer token for accessing objects in a container
Sourcefn get_session_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = NeoFSResult<SessionToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_session_token<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = NeoFSResult<SessionToken>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets a session token for the current account
Sourcefn initiate_multipart_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
object: &'life2 Object,
) -> Pin<Box<dyn Future<Output = NeoFSResult<MultipartUpload>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn initiate_multipart_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
container_id: &'life1 ContainerId,
object: &'life2 Object,
) -> Pin<Box<dyn Future<Output = NeoFSResult<MultipartUpload>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Initiates a multipart upload for a large object
Sourcefn upload_part<'life0, 'life1, 'async_trait>(
&'life0 self,
upload: &'life1 MultipartUpload,
part_number: u32,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Part>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upload_part<'life0, 'life1, 'async_trait>(
&'life0 self,
upload: &'life1 MultipartUpload,
part_number: u32,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = NeoFSResult<Part>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Uploads a part of a multipart upload
Sourcefn complete_multipart_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
upload: &'life1 MultipartUpload,
parts: Vec<Part>,
) -> Pin<Box<dyn Future<Output = NeoFSResult<MultipartUploadResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn complete_multipart_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
upload: &'life1 MultipartUpload,
parts: Vec<Part>,
) -> Pin<Box<dyn Future<Output = NeoFSResult<MultipartUploadResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Completes a multipart upload
Sourcefn abort_multipart_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
upload: &'life1 MultipartUpload,
) -> Pin<Box<dyn Future<Output = NeoFSResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn abort_multipart_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
upload: &'life1 MultipartUpload,
) -> Pin<Box<dyn Future<Output = NeoFSResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Aborts a multipart upload