pub struct MetadataLocation { /* private fields */ }Expand description
Helper for parsing a location of the format: <metadata-dir>/<version>-<uuid>.metadata.json
or with compression: <metadata-dir>/<version>-<uuid>.gz.metadata.json
<metadata-dir> is set to the write.metadata.path table property and
it defaults to the <location>/metadata when the property is not set.
Implementations§
Source§impl MetadataLocation
impl MetadataLocation
Sourcepub fn try_new_with_metadata(metadata: &TableMetadata) -> Result<Self>
pub fn try_new_with_metadata(metadata: &TableMetadata) -> Result<Self>
Creates a completely new metadata location starting at version 0, deriving the
metadata directory and compression settings from the table metadata.
Only used for creating a new table. For updates, see with_next_version and
try_with_new_metadata.
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 try_with_new_metadata(
&self,
new_metadata: &TableMetadata,
) -> Result<Self>
pub fn try_with_new_metadata( &self, new_metadata: &TableMetadata, ) -> Result<Self>
Updates the metadata location with the metadata directory and 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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
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
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,
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,
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> ⓘ
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> ⓘ
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