Struct cloud_storage_lite::client::MockBucketClient [−][src]
A GCS client that targets a specific bucket.
Implementations
impl MockBucketClient
[src]
pub fn checkpoint(&mut self)
[src]
Validate that all current expectations for all methods have been satisfied, and discard them.
pub fn new() -> Self
[src]
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new
method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new
method can still be called
like <MockX as TraitY>::new
impl MockBucketClient
[src]
#[must_use = "Must set return value when not using the \"nightly\" feature"]pub fn expect_bucket_name(&mut self) -> &mut Expectation
[src]
Create an Expectation
for mocking the bucket_name
method
#[must_use = "Must set return value when not using the \"nightly\" feature"]pub fn expect_ping(&mut self) -> &mut Expectation
[src]
Create an Expectation
for mocking the ping
method
#[must_use = "Must set return value when not using the \"nightly\" feature"]pub fn expect_list_objects(&mut self) -> &mut Expectation
[src]
Create an Expectation
for mocking the list_objects
method
#[must_use = "Must set return value when not using the \"nightly\" feature"]pub fn expect_create_object<S>(&mut self) -> &mut Expectation<S> where
S: TryStream + Send + Sync + 'static,
S::Error: Into<Box<dyn Error + Send + Sync>>,
Bytes: From<S::Ok>,
[src]
S: TryStream + Send + Sync + 'static,
S::Error: Into<Box<dyn Error + Send + Sync>>,
Bytes: From<S::Ok>,
Create an Expectation
for mocking the create_object
method
#[must_use = "Must set return value when not using the \"nightly\" feature"]pub fn expect_get_object(&mut self) -> &mut Expectation
[src]
Create an Expectation
for mocking the get_object
method
#[must_use = "Must set return value when not using the \"nightly\" feature"]pub fn expect_download_object(&mut self) -> &mut Expectation
[src]
Create an Expectation
for mocking the download_object
method
#[must_use = "Must set return value when not using the \"nightly\" feature"]pub fn expect_delete_object(&mut self) -> &mut Expectation
[src]
Create an Expectation
for mocking the delete_object
method
Trait Implementations
impl BucketClient for MockBucketClient
[src]
A GCS client that targets a specific bucket.
fn bucket_name(&self) -> &str
[src]
Returns the name of the bucket to which this BucketClient
is connected.
fn ping<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Checks connectivity to the bucket.
fn list_objects<'a, 'life0, 'async_trait>(
&'life0 self,
options: ListObjectOptions<'a>
) -> Pin<Box<dyn Future<Output = Result<Page<Object>, Error>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
options: ListObjectOptions<'a>
) -> Pin<Box<dyn Future<Output = Result<Page<Object>, Error>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Returns a page of objects.
fn create_object<'life0, 'life1, 'async_trait, S>(
&'life0 self,
key: &'life1 str,
value: S
) -> Pin<Box<dyn Future<Output = Result<Object, Error>> + Send + 'async_trait>> where
S: TryStream + Send + Sync + 'static,
S::Error: Into<Box<dyn Error + Send + Sync>>,
Bytes: From<S::Ok>,
S: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
key: &'life1 str,
value: S
) -> Pin<Box<dyn Future<Output = Result<Object, Error>> + Send + 'async_trait>> where
S: TryStream + Send + Sync + 'static,
S::Error: Into<Box<dyn Error + Send + Sync>>,
Bytes: From<S::Ok>,
S: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Creates a new object.
fn get_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Object, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Object, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Gets an object’s metadata.
fn download_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, Result<Bytes, Error>>, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, Result<Bytes, Error>>, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Downloads an object.
fn delete_object<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Deletes an object. This library does not consider deleting a non-existent object an error.
impl Default for MockBucketClient
[src]
Auto Trait Implementations
impl !RefUnwindSafe for MockBucketClient
impl Send for MockBucketClient
impl Sync for MockBucketClient
impl Unpin for MockBucketClient
impl !UnwindSafe for MockBucketClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any + ?Sized,
T: Any + ?Sized,
pub fn type_id_compat(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,