fn object_exists(&self, object_key: &str) -> Result<()> {
        let mut request = HeadObjectRequest::default();
        request.bucket = self.bucket.clone();
        request.key = object_key.to_string();

        match self.client.head_object(&request).sync() {
            Ok(object) => {
                info!("Verified {} was written to minio!", object_key);
                debug!("Head Object check returned: {:?}", object);
                Ok(())
            }
            Err(e) => Err(Error::HeadObject(e)),
        }
    }
// This function checks whether an uploaded file
// exists in the configured s3 bucket. It should
// only get called from within an upload future.
This function checks whether an uploaded file
exists in the configured s3 bucket. It should
only get called from within an upload future.
This function checks whether an uploaded file exists in the configured s3 bucket . It should only get called from within an upload future .
fn object_exists(&self, object_key: &str) -> Result<()> {
        let mut request = HeadObjectRequest::default();
        request.bucket = self.bucket.clone();
        request.key = object_key.to_string();
        match self.client.head_object(&request).sync() {
            Ok(object) => {
                info!("Verified {} was written to minio!", object_key);
                debug!("Head Object check returned: {:?}", object);
                Ok(())
            }
            Err(e) => Err(Error::HeadObject(e)),
        }
    }
fn object_exists ( & self , object_key : & str ) -> Result < ( ) > { let mut request = HeadObjectRequest :: default ( ) ; request . bucket = self . bucket . clone ( ) ; request . key = object_key . to_string ( ) ; match self . client . head_object ( & request ) . sync ( ) { Ok ( object ) => { info ! ( " " object_key ) ; debug ! ( " " object ) ; Ok ( ( ) ) } Err ( e ) => Err ( Error :: HeadObject ( e ) ) , } }
This function checks whether an uploaded file
exists in the configured s3 bucket.
This function checks whether an uploaded file exists in the configured s3 bucket .
&self
object_key
&str
&self
object_key
&str