pub struct TableLocation(/* private fields */);Expand description
Table root location with table-scoped semantics.
This wraps StorageLocation and is used when callers need to treat the
location as a table root (e.g. log layout and segment paths).
Implementations§
Source§impl TableLocation
impl TableLocation
Sourcepub fn local(root: impl Into<PathBuf>) -> Self
pub fn local(root: impl Into<PathBuf>) -> Self
Creates a new TableLocation for a local filesystem path.
Sourcepub fn parse(spec: &str) -> StorageResult<Self>
pub fn parse(spec: &str) -> StorageResult<Self>
Parse a user-facing table location string into a TableLocation. v0.1: only local filesystem paths are supported.
Sourcepub fn storage(&self) -> &StorageLocation
pub fn storage(&self) -> &StorageLocation
Return the underlying StorageLocation
Sourcepub async fn normalize_segment_path(
&self,
segment_path: &Path,
) -> StorageResult<String>
pub async fn normalize_segment_path( &self, segment_path: &Path, ) -> StorageResult<String>
Validate and normalize a segment path for storage in table metadata.
The returned path is table-relative and always uses / separators.
The path must resolve to a file under the table root.
Trait Implementations§
Source§impl AsRef<StorageLocation> for TableLocation
impl AsRef<StorageLocation> for TableLocation
Source§fn as_ref(&self) -> &StorageLocation
fn as_ref(&self) -> &StorageLocation
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for TableLocation
impl Clone for TableLocation
Source§fn clone(&self) -> TableLocation
fn clone(&self) -> TableLocation
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 TableLocation
impl Debug for TableLocation
Source§impl From<TableLocation> for StorageLocation
impl From<TableLocation> for StorageLocation
Source§fn from(t: TableLocation) -> Self
fn from(t: TableLocation) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TableLocation
impl RefUnwindSafe for TableLocation
impl Send for TableLocation
impl Sync for TableLocation
impl Unpin for TableLocation
impl UnsafeUnpin for TableLocation
impl UnwindSafe for TableLocation
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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