pub struct PlRefPath { /* private fields */ }Expand description
Implementations§
Source§impl PlRefPath
impl PlRefPath
pub fn empty() -> Self
pub fn try_from_path(path: &Path) -> PolarsResult<PlRefPath>
pub fn try_from_pathbuf(path: PathBuf) -> PolarsResult<PlRefPath>
pub fn as_str(&self) -> &str
pub fn as_ref_str(&self) -> &PlRefStr
pub fn into_ref_str(self) -> PlRefStr
Sourcepub fn to_absolute_path(&self) -> PolarsResult<Cow<'_, PlRefPath>>
pub fn to_absolute_path(&self) -> PolarsResult<Cow<'_, PlRefPath>>
§Returns
Returns an absolute local path if this path ref is a relative local path, otherwise returns None.
Methods from Deref<Target = PlPath>§
pub fn as_str(&self) -> &str
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_os_str(&self) -> &OsStr
pub fn as_std_path(&self) -> &Path
pub fn to_ref_path(&self) -> PlRefPath
pub fn scheme(&self) -> Option<CloudScheme>
Sourcepub fn has_scheme(&self) -> bool
pub fn has_scheme(&self) -> bool
Shorthand for self.scheme().is_some().
Sourcepub fn strip_scheme(&self) -> &str
pub fn strip_scheme(&self) -> &str
Return a string with the scheme prefix removed (if any).
pub fn file_name(&self) -> Option<&OsStr>
pub fn extension(&self) -> Option<&str>
pub fn parent(&self) -> Option<&str>
Strips the scheme, then returns the authority component, and the remaining string after the authority component. This can be understood as extracting the bucket/prefix for cloud URIs.
E.g. https://user@host:port/dir/file?param=value
- Authority:
user@host:port - Remaining:
/dir/file?param=value
Note, for local / file: URIs, the returned authority will be empty, and
the remainder will be the full URI.
§Returns
(authority, remaining).
Returns 0 if self.scheme() is None. Otherwise, returns i such that
&self.to_str()[..i] trims to the authority.
- If there is no ‘/’, separator found,
iwill simply be the length of the string.- This is except if the scheme is
FileNoHostname, where insteadiwill be “file:”.len()
- This is except if the scheme is
- If
selfhas noCloudScheme, returns 0
pub fn to_absolute_path(&self) -> PolarsResult<PlRefPath>
pub fn join(&self, other: impl AsRef<str>) -> PlRefPath
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PlRefPath
Available on crate feature serde only.
impl<'de> Deserialize<'de> for PlRefPath
Available on crate feature
serde only.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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for PlRefPath
Available on crate feature dsl-schema only.
impl JsonSchema for PlRefPath
Available on crate feature
dsl-schema only.Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn always_inline_schema() -> bool
fn always_inline_schema() -> bool
👎Deprecated: Use
inline_schema() insteadOnly included for backward-compatibility - use
inline_schema() instead“. Read more§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for PlRefPath
impl Ord for PlRefPath
Source§impl PartialOrd for PlRefPath
impl PartialOrd for PlRefPath
impl Eq for PlRefPath
impl StructuralPartialEq for PlRefPath
Auto Trait Implementations§
impl Freeze for PlRefPath
impl RefUnwindSafe for PlRefPath
impl Send for PlRefPath
impl Sync for PlRefPath
impl Unpin for PlRefPath
impl UnwindSafe for PlRefPath
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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 moreSource§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more