pub trait StorageService:
Send
+ Sync
+ 'static {
type GetAllStorageStream: Stream<Item = Result<StorageEntry, Status>> + Send + 'static;
type SearchByPrefixStream: Stream<Item = Result<StorageEntry, Status>> + Send + 'static;
// Required methods
fn get_all_storage<'life0, 'async_trait>(
&'life0 self,
request: Request<GetStorageRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetAllStorageStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_storage_value<'life0, 'async_trait>(
&'life0 self,
request: Request<GetStorageValueRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<StorageValueResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn search_by_prefix<'life0, 'async_trait>(
&'life0 self,
request: Request<SearchRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SearchByPrefixStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with StorageServiceServer.
Required Associated Types§
Sourcetype GetAllStorageStream: Stream<Item = Result<StorageEntry, Status>> + Send + 'static
type GetAllStorageStream: Stream<Item = Result<StorageEntry, Status>> + Send + 'static
Server streaming response type for the GetAllStorage method.
Sourcetype SearchByPrefixStream: Stream<Item = Result<StorageEntry, Status>> + Send + 'static
type SearchByPrefixStream: Stream<Item = Result<StorageEntry, Status>> + Send + 'static
Server streaming response type for the SearchByPrefix method.
Required Methods§
Sourcefn get_all_storage<'life0, 'async_trait>(
&'life0 self,
request: Request<GetStorageRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetAllStorageStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_storage<'life0, 'async_trait>(
&'life0 self,
request: Request<GetStorageRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetAllStorageStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all storage key-value pairs for a contract
Sourcefn get_storage_value<'life0, 'async_trait>(
&'life0 self,
request: Request<GetStorageValueRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<StorageValueResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_storage_value<'life0, 'async_trait>(
&'life0 self,
request: Request<GetStorageValueRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<StorageValueResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a single storage value by key
Sourcefn search_by_prefix<'life0, 'async_trait>(
&'life0 self,
request: Request<SearchRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SearchByPrefixStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search_by_prefix<'life0, 'async_trait>(
&'life0 self,
request: Request<SearchRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SearchByPrefixStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Search storage by key prefix