pub struct Metadata { /* private fields */ }Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn try_new(
name: Option<String>,
description: Option<String>,
schema: Arc<StructType>,
partition_columns: Vec<String>,
created_time: i64,
configuration: HashMap<String, String>,
) -> Result<Metadata, Error>
pub fn try_new( name: Option<String>, description: Option<String>, schema: Arc<StructType>, partition_columns: Vec<String>, created_time: i64, configuration: HashMap<String, String>, ) -> Result<Metadata, Error>
pub fn try_new_from_data( data: &(dyn EngineData + 'static), ) -> Result<Option<Metadata>, Error>
pub fn id(&self) -> &str
pub fn name(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
pub fn created_time(&self) -> Option<i64>
pub fn configuration(&self) -> &HashMap<String, String>
pub fn format_provider(&self) -> &str
pub fn schema_string(&self) -> &String
Sourcepub fn parse_schema(&self) -> Result<StructType, Error>
pub fn parse_schema(&self) -> Result<StructType, Error>
Parses the table schema from its JSON representation.
§Errors
Returns Error::Schema when the schema exceeds the supported decoding depth or
declares a type the kernel doesn’t support, or Error::MalformedJson for other
JSON decoding failures.
pub fn partition_columns(&self) -> &[String]
Sourcepub fn parse_table_properties(&self) -> TableProperties
pub fn parse_table_properties(&self) -> TableProperties
Parse the metadata configuration HashMap<String, String> into a TableProperties struct.
Note that parsing is infallible – any items that fail to parse are simply propagated
through to the TableProperties.unknown_properties field.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metadata
impl<'de> Deserialize<'de> for Metadata
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Metadata, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Metadata, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Metadata
Source§impl IntoEngineData for Metadata
impl IntoEngineData for Metadata
Source§fn into_engine_data(
self,
schema: Arc<StructType>,
engine: &(dyn Engine + 'static),
) -> Result<Box<dyn EngineData>, Error>
fn into_engine_data( self, schema: Arc<StructType>, engine: &(dyn Engine + 'static), ) -> Result<Box<dyn EngineData>, Error>
Consume this type to produce a single-row EngineData using the provided schema.
Source§impl MetadataExt for Metadata
impl MetadataExt for Metadata
Source§fn with_table_id(self, table_id: String) -> DeltaResult<Metadata>
fn with_table_id(self, table_id: String) -> DeltaResult<Metadata>
Return a copy of the metadata with its unique table identifier replaced.
Source§fn with_name(self, name: String) -> DeltaResult<Metadata>
fn with_name(self, name: String) -> DeltaResult<Metadata>
Return a copy of the metadata with the user-facing table name set.
Source§fn with_description(self, description: String) -> DeltaResult<Metadata>
fn with_description(self, description: String) -> DeltaResult<Metadata>
Return a copy of the metadata with the table description set.
Source§fn with_schema(self, schema: &StructType) -> DeltaResult<Metadata>
fn with_schema(self, schema: &StructType) -> DeltaResult<Metadata>
Return a copy of the metadata whose schema string is replaced with
schema.Source§fn add_config_key(self, key: String, value: String) -> DeltaResult<Metadata>
fn add_config_key(self, key: String, value: String) -> DeltaResult<Metadata>
Return a copy of the metadata with a single configuration key set to
value.Source§fn remove_config_key(self, key: &str) -> DeltaResult<Metadata>
fn remove_config_key(self, key: &str) -> DeltaResult<Metadata>
Return a copy of the metadata with the given configuration key removed.
Source§impl Serialize for Metadata
impl Serialize for Metadata
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Forget for Metadata
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnsafeUnpin for Metadata
impl UnwindSafe for Metadata
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> AsAny for T
impl<T> AsAny for T
Source§fn any_ref(&self) -> &(dyn Any + Send + Sync + 'static)
fn any_ref(&self) -> &(dyn Any + Send + Sync + 'static)
Obtains a
dyn Any reference to the object: Read moreSource§fn as_any(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ
fn as_any(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ
Obtains an
Arc<dyn Any> reference to the object: Read moreSource§fn into_any(self: Box<T>) -> Box<dyn Any + Send + Sync>
fn into_any(self: Box<T>) -> Box<dyn Any + Send + Sync>
Converts the object to
Box<dyn Any>: Read moreSource§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Convenient wrapper for
std::any::type_name, since Any does not provide it and
Any::type_id is useless as a debugging aid (its Debug is just a mess of hex digits).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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DynPartialEq for T
impl<T> DynPartialEq for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FoldWithOption for T
impl<T> FoldWithOption for T
Source§impl<T> GetStructField for Twhere
T: ToDataType,
impl<T> GetStructField for Twhere
T: ToDataType,
fn get_struct_field(name: impl Into<String>) -> StructField
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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