pub struct BlobServiceClient<Stub = Channel<BlobServiceRequest, BlobServiceResponse>>(Stub);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Tuple Fields§
§0: StubImplementations§
Source§impl BlobServiceClient
impl BlobServiceClient
Sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<BlobServiceRequest, BlobServiceResponse, T>>where
T: Transport<ClientMessage<BlobServiceRequest>, Response<BlobServiceResponse>>,
pub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<BlobServiceRequest, BlobServiceResponse, T>>where
T: Transport<ClientMessage<BlobServiceRequest>, Response<BlobServiceResponse>>,
Returns a new client stub that sends requests over the given transport.
Source§impl<Stub> BlobServiceClient<Stub>where
Stub: Stub<Req = BlobServiceRequest, Resp = BlobServiceResponse>,
impl<Stub> BlobServiceClient<Stub>where
Stub: Stub<Req = BlobServiceRequest, Resp = BlobServiceResponse>,
Sourcepub fn health_check(
&self,
ctx: Context,
) -> impl Future<Output = Result<BlobResult<BlobHealth>, RpcError>> + '_
pub fn health_check( &self, ctx: Context, ) -> impl Future<Output = Result<BlobResult<BlobHealth>, RpcError>> + '_
Check if the blob store is healthy
Sourcepub fn upload(
&self,
ctx: Context,
data: Vec<u8>,
) -> impl Future<Output = Result<BlobResult<BlobId>, RpcError>> + '_
pub fn upload( &self, ctx: Context, data: Vec<u8>, ) -> impl Future<Output = Result<BlobResult<BlobId>, RpcError>> + '_
Upload a blob and return its hash
Sourcepub fn download(
&self,
ctx: Context,
hash: BlobId,
) -> impl Future<Output = Result<BlobResult<Option<Vec<u8>>>, RpcError>> + '_
pub fn download( &self, ctx: Context, hash: BlobId, ) -> impl Future<Output = Result<BlobResult<Option<Vec<u8>>>, RpcError>> + '_
Download a blob by its hash
Sourcepub fn get_info(
&self,
ctx: Context,
hash: BlobId,
) -> impl Future<Output = Result<BlobResult<Option<BlobInfo>>, RpcError>> + '_
pub fn get_info( &self, ctx: Context, hash: BlobId, ) -> impl Future<Output = Result<BlobResult<Option<BlobInfo>>, RpcError>> + '_
Get information about a blob
Sourcepub fn check_blobs(
&self,
ctx: Context,
hashes: Vec<BlobId>,
) -> impl Future<Output = Result<BlobResult<Vec<bool>>, RpcError>> + '_
pub fn check_blobs( &self, ctx: Context, hashes: Vec<BlobId>, ) -> impl Future<Output = Result<BlobResult<Vec<bool>>, RpcError>> + '_
Check which blobs the server already has stored.
Returns a vec of bool in the same order as the input, where:
truemeans the server has the blob storedfalsemeans the server doesn’t have this blob yet
Trait Implementations§
Source§impl<Stub: Clone> Clone for BlobServiceClient<Stub>
impl<Stub: Clone> Clone for BlobServiceClient<Stub>
Source§fn clone(&self) -> BlobServiceClient<Stub>
fn clone(&self) -> BlobServiceClient<Stub>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Stub: Debug> Debug for BlobServiceClient<Stub>
impl<Stub: Debug> Debug for BlobServiceClient<Stub>
Source§impl<Stub> From<Stub> for BlobServiceClient<Stub>where
Stub: Stub<Req = BlobServiceRequest, Resp = BlobServiceResponse>,
impl<Stub> From<Stub> for BlobServiceClient<Stub>where
Stub: Stub<Req = BlobServiceRequest, Resp = BlobServiceResponse>,
Auto Trait Implementations§
impl<Stub> Freeze for BlobServiceClient<Stub>where
Stub: Freeze,
impl<Stub> RefUnwindSafe for BlobServiceClient<Stub>where
Stub: RefUnwindSafe,
impl<Stub> Send for BlobServiceClient<Stub>where
Stub: Send,
impl<Stub> Sync for BlobServiceClient<Stub>where
Stub: Sync,
impl<Stub> Unpin for BlobServiceClient<Stub>where
Stub: Unpin,
impl<Stub> UnwindSafe for BlobServiceClient<Stub>where
Stub: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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