AsyncAssetService

Trait AsyncAssetService 

Source
pub trait AsyncAssetService {
Show 18 methods // Required methods fn create_asset( &self, auth_: BearerToken, details: CreateAssetRequest, ) -> impl Future<Output = Result<Asset, Error>> + Send; fn update_asset( &self, auth_: BearerToken, rid: AssetRid, details: UpdateAssetRequest, ) -> impl Future<Output = Result<Asset, Error>> + Send; fn add_data_scopes_to_asset( &self, auth_: BearerToken, asset_rid: AssetRid, request: AddDataScopesToAssetRequest, ) -> impl Future<Output = Result<Asset, Error>> + Send; fn get_assets( &self, auth_: BearerToken, rids: BTreeSet<AssetRid>, ) -> impl Future<Output = Result<BTreeMap<AssetRid, Asset>, Error>> + Send; fn get_assets_by_data_source( &self, auth_: BearerToken, data_source_rid: DataSourceRid, ) -> impl Future<Output = Result<BTreeSet<Asset>, Error>> + Send; fn archive( &self, auth_: BearerToken, rid: AssetRid, include_linked_workbooks: Option<bool>, ) -> impl Future<Output = Result<(), Error>> + Send; fn unarchive( &self, auth_: BearerToken, rid: AssetRid, include_linked_workbooks: Option<bool>, ) -> impl Future<Output = Result<(), Error>> + Send; fn search_assets( &self, auth_: BearerToken, search_assets_request: SearchAssetsRequest, ) -> impl Future<Output = Result<SearchAssetsResponse, Error>> + Send; fn search_types( &self, auth_: BearerToken, search_types_request: SearchTypesRequest, ) -> impl Future<Output = Result<SearchTypesResponse, Error>> + Send; fn update_asset_attachments( &self, auth_: BearerToken, rid: AssetRid, request: UpdateAttachmentsRequest, ) -> impl Future<Output = Result<(), Error>> + Send; fn update_asset_ref_names( &self, auth_: BearerToken, rid: AssetRid, request: UpdateAssetRefNamesRequest, ) -> impl Future<Output = Result<(), Error>> + Send; fn create_type( &self, auth_: BearerToken, request: CreateTypeRequest, ) -> impl Future<Output = Result<Type, Error>> + Send; fn update_type( &self, auth_: BearerToken, type_rid: TypeRid, request: UpdateTypeRequest, ) -> impl Future<Output = Result<Type, Error>> + Send; fn get_types( &self, auth_: BearerToken, rids: BTreeSet<TypeRid>, ) -> impl Future<Output = Result<BTreeMap<TypeRid, Type>, Error>> + Send; fn get_types_for_datasource( &self, auth_: BearerToken, datasource_rid: DataSourceRid, ) -> impl Future<Output = Result<Vec<Type>, Error>> + Send; fn delete_type( &self, auth_: BearerToken, rid: TypeRid, ) -> impl Future<Output = Result<(), Error>> + Send; fn archive_type( &self, auth_: BearerToken, rid: TypeRid, ) -> impl Future<Output = Result<(), Error>> + Send; fn unarchive_type( &self, auth_: BearerToken, rid: TypeRid, ) -> impl Future<Output = Result<(), Error>> + Send;
}
Expand description

An asset is a physical entity within an organization, such as a vehicle or ground station. Assets are comprised of some metadata about the data, as well as a set of data scopes that define the data belonging to the asset. API endpoints allow for CRUD operations on asset objects.

Required Methods§

Source

fn create_asset( &self, auth_: BearerToken, details: CreateAssetRequest, ) -> impl Future<Output = Result<Asset, Error>> + Send

Source

fn update_asset( &self, auth_: BearerToken, rid: AssetRid, details: UpdateAssetRequest, ) -> impl Future<Output = Result<Asset, Error>> + Send

Source

fn add_data_scopes_to_asset( &self, auth_: BearerToken, asset_rid: AssetRid, request: AddDataScopesToAssetRequest, ) -> impl Future<Output = Result<Asset, Error>> + Send

Adds data scopes to an asset.

Throws if the asset already has data scopes with data scope names matching those in the request.

Source

fn get_assets( &self, auth_: BearerToken, rids: BTreeSet<AssetRid>, ) -> impl Future<Output = Result<BTreeMap<AssetRid, Asset>, Error>> + Send

Source

fn get_assets_by_data_source( &self, auth_: BearerToken, data_source_rid: DataSourceRid, ) -> impl Future<Output = Result<BTreeSet<Asset>, Error>> + Send

Returns all assets with given data source as a data scope.

Source

fn archive( &self, auth_: BearerToken, rid: AssetRid, include_linked_workbooks: Option<bool>, ) -> impl Future<Output = Result<(), Error>> + Send

Source

fn unarchive( &self, auth_: BearerToken, rid: AssetRid, include_linked_workbooks: Option<bool>, ) -> impl Future<Output = Result<(), Error>> + Send

Source

fn search_assets( &self, auth_: BearerToken, search_assets_request: SearchAssetsRequest, ) -> impl Future<Output = Result<SearchAssetsResponse, Error>> + Send

Source

fn search_types( &self, auth_: BearerToken, search_types_request: SearchTypesRequest, ) -> impl Future<Output = Result<SearchTypesResponse, Error>> + Send

Source

fn update_asset_attachments( &self, auth_: BearerToken, rid: AssetRid, request: UpdateAttachmentsRequest, ) -> impl Future<Output = Result<(), Error>> + Send

Update the attachments associated with an asset.

Source

fn update_asset_ref_names( &self, auth_: BearerToken, rid: AssetRid, request: UpdateAssetRefNamesRequest, ) -> impl Future<Output = Result<(), Error>> + Send

Update the ref names for the data scopes on the asset. This update will also be applied on all associated workbooks.

Source

fn create_type( &self, auth_: BearerToken, request: CreateTypeRequest, ) -> impl Future<Output = Result<Type, Error>> + Send

Creates a new type.

Source

fn update_type( &self, auth_: BearerToken, type_rid: TypeRid, request: UpdateTypeRequest, ) -> impl Future<Output = Result<Type, Error>> + Send

Updates a type. Will throw unless all assets that reference the type pass the updated type check.

Source

fn get_types( &self, auth_: BearerToken, rids: BTreeSet<TypeRid>, ) -> impl Future<Output = Result<BTreeMap<TypeRid, Type>, Error>> + Send

Source

fn get_types_for_datasource( &self, auth_: BearerToken, datasource_rid: DataSourceRid, ) -> impl Future<Output = Result<Vec<Type>, Error>> + Send

Source

fn delete_type( &self, auth_: BearerToken, rid: TypeRid, ) -> impl Future<Output = Result<(), Error>> + Send

Deletes a type. The type must not be referenced by any assets.

Source

fn archive_type( &self, auth_: BearerToken, rid: TypeRid, ) -> impl Future<Output = Result<(), Error>> + Send

Source

fn unarchive_type( &self, auth_: BearerToken, rid: TypeRid, ) -> impl Future<Output = Result<(), Error>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§