pub struct ColumnPath {
parts: Vec<String>,
}
Expand description
Represents the location of a column in a Parquet schema
§Example: refer to column named 'my_column'
let column_path = ColumnPath::from("my_column");
§Example: refer to column named c
in a nested struct {a: {b: {c: ...}}}
// form path 'a.b.c'
let column_path = ColumnPath::from(vec![
String::from("a"),
String::from("b"),
String::from("c")
]);
Fields§
§parts: Vec<String>
Implementations§
Source§impl ColumnPath
impl ColumnPath
Sourcepub fn string(&self) -> String
pub fn string(&self) -> String
Returns string representation of this column path.
use parquet::schema::types::ColumnPath;
let path = ColumnPath::new(vec!["a".to_string(), "b".to_string(), "c".to_string()]);
assert_eq!(&path.string(), "a.b.c");
Sourcepub fn append(&mut self, tail: Vec<String>)
pub fn append(&mut self, tail: Vec<String>)
Appends more components to end of column path.
use parquet::schema::types::ColumnPath;
let mut path = ColumnPath::new(vec!["a".to_string(), "b".to_string(), "c"
.to_string()]);
assert_eq!(&path.string(), "a.b.c");
path.append(vec!["d".to_string(), "e".to_string()]);
assert_eq!(&path.string(), "a.b.c.d.e");
Trait Implementations§
Source§impl AsRef<[String]> for ColumnPath
impl AsRef<[String]> for ColumnPath
Source§impl Clone for ColumnPath
impl Clone for ColumnPath
Source§fn clone(&self) -> ColumnPath
fn clone(&self) -> ColumnPath
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 ColumnPath
impl Debug for ColumnPath
Source§impl Display for ColumnPath
impl Display for ColumnPath
Source§impl From<&str> for ColumnPath
impl From<&str> for ColumnPath
Source§impl From<String> for ColumnPath
impl From<String> for ColumnPath
Source§impl Hash for ColumnPath
impl Hash for ColumnPath
Source§impl HeapSize for ColumnPath
impl HeapSize for ColumnPath
Source§impl PartialEq for ColumnPath
impl PartialEq for ColumnPath
impl Eq for ColumnPath
impl StructuralPartialEq for ColumnPath
Auto Trait Implementations§
impl Freeze for ColumnPath
impl RefUnwindSafe for ColumnPath
impl Send for ColumnPath
impl Sync for ColumnPath
impl Unpin for ColumnPath
impl UnwindSafe for ColumnPath
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> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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