pub struct ObjectStoreUrl { /* private fields */ }Expand description
A parsed URL identifying a particular ObjectStore instance
For example:
file://for local file systems3://bucketfor AWS S3 bucketoss://bucketfor Aliyun OSS bucket
Implementations§
Source§impl ObjectStoreUrl
impl ObjectStoreUrl
Sourcepub fn parse(s: impl AsRef<str>) -> Result<ObjectStoreUrl, DataFusionError>
pub fn parse(s: impl AsRef<str>) -> Result<ObjectStoreUrl, DataFusionError>
Parse an ObjectStoreUrl from a string
§Example
let object_store_url = ObjectStoreUrl::parse("s3://bucket").unwrap();
assert_eq!(object_store_url.as_str(), "s3://bucket/");
// can also access the underlying `Url`
let url: &Url = object_store_url.as_ref();
assert_eq!(url.scheme(), "s3");
assert_eq!(url.host_str(), Some("bucket"));
assert_eq!(url.path(), "/");Sourcepub fn local_filesystem() -> ObjectStoreUrl
pub fn local_filesystem() -> ObjectStoreUrl
An ObjectStoreUrl for the local filesystem (file://)
§Example
let local_fs = ObjectStoreUrl::parse("file://").unwrap();
assert_eq!(local_fs, ObjectStoreUrl::local_filesystem())Sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Returns this ObjectStoreUrl as a string
Trait Implementations§
Source§impl AsRef<Url> for ObjectStoreUrl
impl AsRef<Url> for ObjectStoreUrl
Source§impl AsRef<str> for ObjectStoreUrl
impl AsRef<str> for ObjectStoreUrl
Source§impl Clone for ObjectStoreUrl
impl Clone for ObjectStoreUrl
Source§fn clone(&self) -> ObjectStoreUrl
fn clone(&self) -> ObjectStoreUrl
Returns a duplicate of the value. Read more
1.0.0 · 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 ObjectStoreUrl
impl Debug for ObjectStoreUrl
Source§impl Display for ObjectStoreUrl
impl Display for ObjectStoreUrl
Source§impl Hash for ObjectStoreUrl
impl Hash for ObjectStoreUrl
Source§impl Ord for ObjectStoreUrl
impl Ord for ObjectStoreUrl
Source§fn cmp(&self, other: &ObjectStoreUrl) -> Ordering
fn cmp(&self, other: &ObjectStoreUrl) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ObjectStoreUrl
impl PartialEq for ObjectStoreUrl
Source§impl PartialOrd for ObjectStoreUrl
impl PartialOrd for ObjectStoreUrl
impl Eq for ObjectStoreUrl
impl StructuralPartialEq for ObjectStoreUrl
Auto Trait Implementations§
impl Freeze for ObjectStoreUrl
impl RefUnwindSafe for ObjectStoreUrl
impl Send for ObjectStoreUrl
impl Sync for ObjectStoreUrl
impl Unpin for ObjectStoreUrl
impl UnwindSafe for ObjectStoreUrl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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