pub struct BucketConfig {
pub hash_algorithm: HashAlgorithm,
pub accepted_compression_algorithms: Vec<CompressionAlgorithm>,
}Expand description
BucketConfig is the type of the configuration of a bucket.
The configuration is set at the instantiation of the bucket, and is immutable and cannot be changed. The configuration is optional and if not set, the default configuration is used.
Fields§
§hash_algorithm: HashAlgorithmThe algorithm used to hash the content of the objects to generate the id of the objects. The algorithm is optional and if not set, the default algorithm is used.
The default algorithm is Sha256 if not set.
accepted_compression_algorithms: Vec<CompressionAlgorithm>The acceptable compression algorithms for the objects in the bucket. If this parameter is not set, then all compression algorithms are accepted. If this parameter is set, then only the compression algorithms in the array are accepted.
When an object is stored in the bucket without a specified compression algorithm, the first algorithm in the array is used. Therefore, the order of the algorithms in the array is significant. Typically, the most efficient compression algorithm, such as the NoCompression algorithm, should be placed first in the array.
Any attempt to store an object using a different compression algorithm than the ones specified here will fail.
Trait Implementations§
Source§impl Clone for BucketConfig
impl Clone for BucketConfig
Source§fn clone(&self) -> BucketConfig
fn clone(&self) -> BucketConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BucketConfig
impl Debug for BucketConfig
Source§impl Default for BucketConfig
impl Default for BucketConfig
Source§impl<'de> Deserialize<'de> for BucketConfig
impl<'de> Deserialize<'de> for BucketConfig
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 From<BucketConfig> for BucketConfig
impl From<BucketConfig> for BucketConfig
Source§fn from(config: BucketConfig) -> Self
fn from(config: BucketConfig) -> Self
Source§impl JsonSchema for BucketConfig
impl JsonSchema for BucketConfig
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for BucketConfig
impl PartialEq for BucketConfig
Source§impl Serialize for BucketConfig
impl Serialize for BucketConfig
impl StructuralPartialEq for BucketConfig
Source§impl TryFrom<BucketConfig> for BucketConfig
impl TryFrom<BucketConfig> for BucketConfig
Source§fn try_from(config: BucketConfig) -> StdResult<BucketConfig>
fn try_from(config: BucketConfig) -> StdResult<BucketConfig>
Auto Trait Implementations§
impl Freeze for BucketConfig
impl RefUnwindSafe for BucketConfig
impl Send for BucketConfig
impl Sync for BucketConfig
impl Unpin for BucketConfig
impl UnsafeUnpin for BucketConfig
impl UnwindSafe for BucketConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more