pub struct MetadataLocation { /* private fields */ }Expand description
Helper for parsing a location of the format: <location>/metadata/<version>-<uuid>.metadata.json
or with compression: <location>/metadata/<version>-<uuid>.gz.metadata.json
Implementations§
Source§impl MetadataLocation
impl MetadataLocation
Sourcepub fn new_with_table_location(table_location: impl ToString) -> Self
👎Deprecated since 0.8.0: Use new_with_metadata instead to properly handle compression settings
pub fn new_with_table_location(table_location: impl ToString) -> Self
Creates a completely new metadata location starting at version 0.
Only used for creating a new table. For updates, see next_version.
Sourcepub fn new_with_metadata(
table_location: impl ToString,
metadata: &TableMetadata,
) -> Self
pub fn new_with_metadata( table_location: impl ToString, metadata: &TableMetadata, ) -> Self
Creates a completely new metadata location starting at version 0,
with compression settings from the table metadata.
Only used for creating a new table. For updates, see next_version.
Sourcepub fn with_next_version(&self) -> Self
pub fn with_next_version(&self) -> Self
Creates a new metadata location for an updated metadata file. Increments the version number and generates a new UUID.
Sourcepub fn with_new_metadata(&self, new_metadata: &TableMetadata) -> Self
pub fn with_new_metadata(&self, new_metadata: &TableMetadata) -> Self
Updates the metadata location with compression settings from the new metadata.
Sourcepub fn compression_codec(&self) -> CompressionCodec
pub fn compression_codec(&self) -> CompressionCodec
Returns the compression codec used for this metadata location.
Trait Implementations§
Source§impl Clone for MetadataLocation
impl Clone for MetadataLocation
Source§fn clone(&self) -> MetadataLocation
fn clone(&self) -> MetadataLocation
Returns a duplicate 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 MetadataLocation
impl Debug for MetadataLocation
Source§impl Display for MetadataLocation
impl Display for MetadataLocation
Source§impl FromStr for MetadataLocation
impl FromStr for MetadataLocation
Source§impl PartialEq for MetadataLocation
impl PartialEq for MetadataLocation
impl StructuralPartialEq for MetadataLocation
Auto Trait Implementations§
impl Freeze for MetadataLocation
impl RefUnwindSafe for MetadataLocation
impl Send for MetadataLocation
impl Sync for MetadataLocation
impl Unpin for MetadataLocation
impl UnsafeUnpin for MetadataLocation
impl UnwindSafe for MetadataLocation
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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