pub struct StorageConfig {
pub uri: StorageUri,
pub prefix: Option<String>,
pub public: bool,
pub endpoint: Option<String>,
pub region: Option<String>,
}Expand description
Storage configuration, typically loaded from TOML:
[storage]
uri = "./data/parquet" # local
# uri = "s3://my-bucket" # S3/MinIO/RustFS bucket
# uri = "gs://my-bucket" # GCS bucket
prefix = "datasets/"Fields§
§uri: StorageUri§prefix: Option<String>Object key prefix applied to all operations.
This is stored separately from uri.
e.g., "datasets/" means get("file.parquet") resolves to datasets/file.parquet.
public: boolSkip request signing for public buckets.
Only used when uri is s3:// or gs://.
endpoint: Option<String>S3-compatible endpoint override (MinIO, RustFS, etc.).
Only used when uri is s3://.
region: Option<String>AWS region. Only used when uri is s3://.
Implementations§
Source§impl StorageConfig
impl StorageConfig
Sourcepub fn resolve_key(&self, key: &str) -> String
pub fn resolve_key(&self, key: &str) -> String
Resolve a key relative to the configured prefix.
Trait Implementations§
Source§impl Clone for StorageConfig
impl Clone for StorageConfig
Source§fn clone(&self) -> StorageConfig
fn clone(&self) -> StorageConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StorageConfig
impl Debug for StorageConfig
Source§impl<'de> Deserialize<'de> for StorageConfig
impl<'de> Deserialize<'de> for StorageConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StorageConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StorageConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for StorageConfig
impl Serialize for StorageConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for StorageConfig
impl RefUnwindSafe for StorageConfig
impl Send for StorageConfig
impl Sync for StorageConfig
impl Unpin for StorageConfig
impl UnsafeUnpin for StorageConfig
impl UnwindSafe for StorageConfig
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