pub struct ObjectUrl {
pub scheme: CloudScheme,
pub bucket: String,
pub key: String,
pub region: Option<String>,
pub endpoint: Option<String>,
}Expand description
A parsed cloud object URL.
Fields§
§scheme: CloudSchemeScheme of the URL.
bucket: StringBucket or container name.
key: StringObject key / path within the bucket.
region: Option<String>AWS / GCS region (if present in the URL).
endpoint: Option<String>Custom endpoint override.
Implementations§
Source§impl ObjectUrl
impl ObjectUrl
Sourcepub fn parse(url: &str) -> Result<Self, CloudError>
pub fn parse(url: &str) -> Result<Self, CloudError>
Parse a cloud URL string into an ObjectUrl.
Supported forms:
s3://bucket/keygs://bucket/keyaz://container/blobabfs://container@account.dfs.core.windows.net/pathhttp://host/pathhttps://host/path
Sourcepub fn to_https_url(&self, endpoint_override: Option<&str>) -> String
pub fn to_https_url(&self, endpoint_override: Option<&str>) -> String
Convert the cloud URL to an HTTPS URL.
- S3:
https://{bucket}.s3.{region}.amazonaws.com/{key} - GCS:
https://storage.googleapis.com/{bucket}/{key} - Azure:
https://{account}.blob.core.windows.net/{container}/{key} - HTTP/HTTPS: return as-is (upgraded to https for http)
Sourcepub fn signing_host(&self) -> String
pub fn signing_host(&self) -> String
Build the canonical host string used when signing requests.
Sourcepub fn signing_path(&self) -> String
pub fn signing_path(&self) -> String
Return the URL path component used for signing.
Trait Implementations§
impl Eq for ObjectUrl
impl StructuralPartialEq for ObjectUrl
Auto Trait Implementations§
impl Freeze for ObjectUrl
impl RefUnwindSafe for ObjectUrl
impl Send for ObjectUrl
impl Sync for ObjectUrl
impl Unpin for ObjectUrl
impl UnsafeUnpin for ObjectUrl
impl UnwindSafe for ObjectUrl
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