Struct datafusion_execution::object_store::ObjectStoreUrl
source · pub struct ObjectStoreUrl { /* private fields */ }
Expand description
A parsed URL identifying a particular ObjectStore
instance
For example:
file://
for local file systems3://bucket
for AWS S3 bucketoss://bucket
for Aliyun OSS bucket
Implementations§
source§impl ObjectStoreUrl
impl ObjectStoreUrl
sourcepub fn parse(s: impl AsRef<str>) -> Result<Self>
pub fn parse(s: impl AsRef<str>) -> Result<Self>
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() -> Self
pub fn local_filesystem() -> Self
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 copy 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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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§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<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