pub struct ViewMetadata { /* private fields */ }
Expand description
Fields for the version 1 of the view metadata.
We assume that this data structure is always valid, so we will panic when invalid error happens. We check the validity of this data structure when constructing.
Implementations§
Source§impl ViewMetadata
impl ViewMetadata
Sourcepub fn into_builder(self) -> ViewMetadataBuilder
pub fn into_builder(self) -> ViewMetadataBuilder
Convert this View Metadata into a builder for modification.
Sourcepub fn format_version(&self) -> ViewFormatVersion
pub fn format_version(&self) -> ViewFormatVersion
Returns format version of this metadata.
Sourcepub fn current_version_id(&self) -> ViewVersionId
pub fn current_version_id(&self) -> ViewVersionId
Returns the current version id.
Sourcepub fn versions(&self) -> impl ExactSizeIterator<Item = &ViewVersionRef>
pub fn versions(&self) -> impl ExactSizeIterator<Item = &ViewVersionRef>
Returns all view versions.
Sourcepub fn version_by_id(
&self,
version_id: ViewVersionId,
) -> Option<&ViewVersionRef>
pub fn version_by_id( &self, version_id: ViewVersionId, ) -> Option<&ViewVersionRef>
Lookup a view version by id.
Sourcepub fn current_version(&self) -> &ViewVersionRef
pub fn current_version(&self) -> &ViewVersionRef
Returns the current view version.
Sourcepub fn schemas_iter(&self) -> impl ExactSizeIterator<Item = &SchemaRef>
pub fn schemas_iter(&self) -> impl ExactSizeIterator<Item = &SchemaRef>
Returns schemas
Sourcepub fn schema_by_id(&self, schema_id: SchemaId) -> Option<&SchemaRef>
pub fn schema_by_id(&self, schema_id: SchemaId) -> Option<&SchemaRef>
Lookup schema by id.
Sourcepub fn current_schema(&self) -> &SchemaRef
pub fn current_schema(&self) -> &SchemaRef
Get current schema
Sourcepub fn properties(&self) -> &HashMap<String, String>
pub fn properties(&self) -> &HashMap<String, String>
Returns properties of the view.
Sourcepub fn history(&self) -> &[ViewVersionLog]
pub fn history(&self) -> &[ViewVersionLog]
Returns view history.
Trait Implementations§
Source§impl Clone for ViewMetadata
impl Clone for ViewMetadata
Source§fn clone(&self) -> ViewMetadata
fn clone(&self) -> ViewMetadata
Returns a copy 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 ViewMetadata
impl Debug for ViewMetadata
Source§impl<'de> Deserialize<'de> for ViewMetadata
impl<'de> Deserialize<'de> for ViewMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ViewMetadata
impl PartialEq for ViewMetadata
Source§impl Serialize for ViewMetadata
impl Serialize for ViewMetadata
impl Eq for ViewMetadata
impl StructuralPartialEq for ViewMetadata
Auto Trait Implementations§
impl Freeze for ViewMetadata
impl RefUnwindSafe for ViewMetadata
impl Send for ViewMetadata
impl Sync for ViewMetadata
impl Unpin for ViewMetadata
impl UnwindSafe for ViewMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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