pub struct DataStorageOptions {Show 17 fields
pub storage: i32,
pub data_dir: String,
pub dir_structure: String,
pub force_fsync: bool,
pub s3_bucket: Option<String>,
pub s3_region: Option<String>,
pub s3_access_key: Option<String>,
pub s3_access_key_path: Option<String>,
pub s3_secret_key: Option<String>,
pub s3_secret_key_path: Option<String>,
pub s3_url: Option<String>,
pub s3_force_path_style: bool,
pub s3_security_token: Option<String>,
pub s3_session_token: Option<String>,
pub s3_profile: Option<String>,
pub s3_headers: Option<String>,
pub s3_concat_concurrent_downloads: u32,
}Fields§
§storage: i32Rustus storage type.
Storages are used to store uploads.
NOTE: Rust default is default_storage() -> FileStorage. Apply this default if field absent.
data_dir: StringRustus data directory
This directory is used to store files for all file_storage storages.
PathBuf in Rust -> string path here.
NOTE: Rust default is ./data.
dir_structure: StringStorage directory structure. This template shows inner directory structure. You can use following variables: day, month, year or even environment variables. Example: “/year/month/day/env[HOSTNAME]/”.
force_fsync: boolForces fsync call after writing chunk to filesystem. Useful for network filesystems.
s3_bucket: Option<String>S3 bucket to upload files to.
This parameter is required for s3-based storages.
s3_region: Option<String>S3 region.
This parameter is required for s3-based storages.
s3_access_key: Option<String>S3 access key.
This parameter is required for s3-based storages.
s3_access_key_path: Option<String>S3 access key path.
path to file that has s3-access-key inside.
This parameter is used for s3-based storages.
s3_secret_key: Option<String>S3 secret key.
This parameter is required for s3-based storages.
s3_secret_key_path: Option<String>S3 secret key path.
path to file that has s3-secret-key inside.
This parameter is required for s3-based storages.
s3_url: Option<String>S3 URL.
This parameter is required for s3-based storages.
s3_force_path_style: boolS3 force path style.
This parameter is required for some s3-based storages (e.g. MinIO).
s3_security_token: Option<String>S3 security token.
This parameter is used for temporary credentials.
s3_session_token: Option<String>S3 session token.
s3_profile: Option<String>S3 profile.
s3_headers: Option<String>Additional S3 headers. These headers are passed to every request to s3. Useful for configuring ACLs.
s3_concat_concurrent_downloads: u32Number of concurrent downloads of partial files from S3. When performing concatenation, Rustus downloads all partial files from S3 and concatenates them into a single file.
This parameter controls the number of concurrent downloads.
NOTE: Rust default = 10
Implementations§
Source§impl DataStorageOptions
impl DataStorageOptions
Sourcepub fn storage(&self) -> AvailableDataStorages
pub fn storage(&self) -> AvailableDataStorages
Returns the enum value of storage, or the default if the field is set to an invalid enum value.
Sourcepub fn set_storage(&mut self, value: AvailableDataStorages)
pub fn set_storage(&mut self, value: AvailableDataStorages)
Sets storage to the provided enum value.
Sourcepub fn s3_bucket(&self) -> &str
pub fn s3_bucket(&self) -> &str
Returns the value of s3_bucket, or the default value if s3_bucket is unset.
Sourcepub fn s3_region(&self) -> &str
pub fn s3_region(&self) -> &str
Returns the value of s3_region, or the default value if s3_region is unset.
Sourcepub fn s3_access_key(&self) -> &str
pub fn s3_access_key(&self) -> &str
Returns the value of s3_access_key, or the default value if s3_access_key is unset.
Sourcepub fn s3_access_key_path(&self) -> &str
pub fn s3_access_key_path(&self) -> &str
Returns the value of s3_access_key_path, or the default value if s3_access_key_path is unset.
Sourcepub fn s3_secret_key(&self) -> &str
pub fn s3_secret_key(&self) -> &str
Returns the value of s3_secret_key, or the default value if s3_secret_key is unset.
Sourcepub fn s3_secret_key_path(&self) -> &str
pub fn s3_secret_key_path(&self) -> &str
Returns the value of s3_secret_key_path, or the default value if s3_secret_key_path is unset.
Sourcepub fn s3_url(&self) -> &str
pub fn s3_url(&self) -> &str
Returns the value of s3_url, or the default value if s3_url is unset.
Sourcepub fn s3_security_token(&self) -> &str
pub fn s3_security_token(&self) -> &str
Returns the value of s3_security_token, or the default value if s3_security_token is unset.
Sourcepub fn s3_session_token(&self) -> &str
pub fn s3_session_token(&self) -> &str
Returns the value of s3_session_token, or the default value if s3_session_token is unset.
Sourcepub fn s3_profile(&self) -> &str
pub fn s3_profile(&self) -> &str
Returns the value of s3_profile, or the default value if s3_profile is unset.
Sourcepub fn s3_headers(&self) -> &str
pub fn s3_headers(&self) -> &str
Returns the value of s3_headers, or the default value if s3_headers is unset.
Trait Implementations§
Source§impl Clone for DataStorageOptions
impl Clone for DataStorageOptions
Source§fn clone(&self) -> DataStorageOptions
fn clone(&self) -> DataStorageOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataStorageOptions
impl Debug for DataStorageOptions
Source§impl Default for DataStorageOptions
impl Default for DataStorageOptions
Source§impl<'de> Deserialize<'de> for DataStorageOptions
impl<'de> Deserialize<'de> for DataStorageOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for DataStorageOptions
impl Message for DataStorageOptions
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for DataStorageOptions
impl PartialEq for DataStorageOptions
Source§impl Serialize for DataStorageOptions
impl Serialize for DataStorageOptions
impl StructuralPartialEq for DataStorageOptions
Auto Trait Implementations§
impl Freeze for DataStorageOptions
impl RefUnwindSafe for DataStorageOptions
impl Send for DataStorageOptions
impl Sync for DataStorageOptions
impl Unpin for DataStorageOptions
impl UnwindSafe for DataStorageOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request