pub struct DataUploader { /* private fields */ }
Implementations§
Source§impl DataUploader
impl DataUploader
Sourcepub fn new(auth: Auth) -> Self
pub fn new(auth: Auth) -> Self
Examples found in repository?
examples/upload_data.rs (line 20)
13fn main() {
14 println!("Starts to upload simple data for an example");
15
16 let auth = Auth {
17 access_key: ACCESS_KEY.to_string(),
18 secret_key: SECRET_KEY.to_string(),
19 };
20 let uploader = DataUploader::new(auth);
21 uploader
22 .upload(BUCKET, KEY, EXPIRED_SECONDS, &DATA.as_bytes())
23 .unwrap();
24
25 println!("Finishes data upload");
26}
Sourcepub fn upload(
&self,
bucket: &str,
key: &str,
expired_seconds: u64,
data: &'static [u8],
) -> Result<(), QiniuErr>
pub fn upload( &self, bucket: &str, key: &str, expired_seconds: u64, data: &'static [u8], ) -> Result<(), QiniuErr>
Examples found in repository?
examples/upload_data.rs (line 22)
13fn main() {
14 println!("Starts to upload simple data for an example");
15
16 let auth = Auth {
17 access_key: ACCESS_KEY.to_string(),
18 secret_key: SECRET_KEY.to_string(),
19 };
20 let uploader = DataUploader::new(auth);
21 uploader
22 .upload(BUCKET, KEY, EXPIRED_SECONDS, &DATA.as_bytes())
23 .unwrap();
24
25 println!("Finishes data upload");
26}
Auto Trait Implementations§
impl Freeze for DataUploader
impl RefUnwindSafe for DataUploader
impl Send for DataUploader
impl Sync for DataUploader
impl Unpin for DataUploader
impl UnwindSafe for DataUploader
Blanket Implementations§
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