pub struct TablePathRef { /* private fields */ }Expand description
A parsed absolute or relative table path reference.
Implementations§
Source§impl TablePathRef
impl TablePathRef
Sourcepub fn new(
absolute: bool,
parts: Vec<TablePathRefPart>,
) -> Result<Self, TablePathRefError>
pub fn new( absolute: bool, parts: Vec<TablePathRefPart>, ) -> Result<Self, TablePathRefError>
Create a path reference from already separated components.
Sourcepub fn parse(input: &str) -> Result<Self, TablePathRefError>
pub fn parse(input: &str) -> Result<Self, TablePathRefError>
Parse an absolute or relative textual path reference.
Sourcepub fn is_absolute(&self) -> bool
pub fn is_absolute(&self) -> bool
Whether this reference starts at root.
Sourcepub fn parts(&self) -> &[TablePathRefPart]
pub fn parts(&self) -> &[TablePathRefPart]
The parsed reference components.
Sourcepub fn resolve(&self, base: &TablePath) -> Result<TablePath, TablePathRefError>
pub fn resolve(&self, base: &TablePath) -> Result<TablePath, TablePathRefError>
Resolve this reference against base, returning a canonical path.
Sourcepub fn to_reference_string(&self) -> String
pub fn to_reference_string(&self) -> String
Format this reference with percent-escaped segments and / separators.
Trait Implementations§
Source§impl Clone for TablePathRef
impl Clone for TablePathRef
Source§fn clone(&self) -> TablePathRef
fn clone(&self) -> TablePathRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TablePathRef
impl Debug for TablePathRef
Source§impl Display for TablePathRef
impl Display for TablePathRef
impl Eq for TablePathRef
Source§impl PartialEq for TablePathRef
impl PartialEq for TablePathRef
impl StructuralPartialEq for TablePathRef
Auto Trait Implementations§
impl Freeze for TablePathRef
impl RefUnwindSafe for TablePathRef
impl Send for TablePathRef
impl Sync for TablePathRef
impl Unpin for TablePathRef
impl UnsafeUnpin for TablePathRef
impl UnwindSafe for TablePathRef
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