#[non_exhaustive]pub struct CreateStorageRequest {Show 14 fields
pub account_id: i64,
pub region_id: i64,
pub name: String,
pub description: Option<String>,
pub storage_type: String,
pub provider_type: String,
pub endpoint: String,
pub region: Option<String>,
pub bucket: Option<String>,
pub base: Option<String>,
pub block_region: Option<String>,
pub block_size: Option<i32>,
pub access_key: Option<String>,
pub secret_key: Option<String>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.account_id: i64§region_id: i64§name: String§description: Option<String>§storage_type: String§provider_type: String§endpoint: String§region: Option<String>§bucket: Option<String>§base: Option<String>§block_region: Option<String>§block_size: Option<i32>§access_key: Option<String>§secret_key: Option<String>Implementations§
Source§impl CreateStorageRequest
impl CreateStorageRequest
Sourcepub fn new(
account_id: i64,
region_id: i64,
name: impl Into<String>,
storage_type: impl Into<String>,
provider_type: impl Into<String>,
endpoint: impl Into<String>,
) -> Self
pub fn new( account_id: i64, region_id: i64, name: impl Into<String>, storage_type: impl Into<String>, provider_type: impl Into<String>, endpoint: impl Into<String>, ) -> Self
Builds the value from its required fields. Optional fields start unset.
Sourcepub fn with_description(self, value: impl Into<String>) -> Self
pub fn with_description(self, value: impl Into<String>) -> Self
Sets description.
Sourcepub fn with_region(self, value: impl Into<String>) -> Self
pub fn with_region(self, value: impl Into<String>) -> Self
Sets region.
Sourcepub fn with_bucket(self, value: impl Into<String>) -> Self
pub fn with_bucket(self, value: impl Into<String>) -> Self
Sets bucket.
Sourcepub fn with_block_region(self, value: impl Into<String>) -> Self
pub fn with_block_region(self, value: impl Into<String>) -> Self
Sets block_region.
Sourcepub fn with_block_size(self, value: i32) -> Self
pub fn with_block_size(self, value: i32) -> Self
Sets block_size.
Sourcepub fn with_access_key(self, value: impl Into<String>) -> Self
pub fn with_access_key(self, value: impl Into<String>) -> Self
Sets access_key.
Sourcepub fn with_secret_key(self, value: impl Into<String>) -> Self
pub fn with_secret_key(self, value: impl Into<String>) -> Self
Sets secret_key.
Trait Implementations§
Source§impl Clone for CreateStorageRequest
impl Clone for CreateStorageRequest
Source§impl Debug for CreateStorageRequest
impl Debug for CreateStorageRequest
Source§impl Default for CreateStorageRequest
impl Default for CreateStorageRequest
Auto Trait Implementations§
impl Freeze for CreateStorageRequest
impl RefUnwindSafe for CreateStorageRequest
impl Send for CreateStorageRequest
impl Sync for CreateStorageRequest
impl Unpin for CreateStorageRequest
impl UnsafeUnpin for CreateStorageRequest
impl UnwindSafe for CreateStorageRequest
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