pub enum SchemaIdContainer {
Id(SchemaId),
Tree(SchemaIdTree),
}
Variants§
Id(SchemaId)
Tree(SchemaIdTree)
Implementations§
source§impl SchemaIdContainer
impl SchemaIdContainer
pub fn new<T>(prefer_tree: bool) -> Self
pub fn new_id(id: impl Into<SchemaId>) -> Self
pub fn new_tree(tree: impl Into<SchemaIdTree>) -> Self
pub fn as_id(&self) -> Option<&SchemaId>
pub fn as_tree(&self) -> Option<&SchemaIdTree>
pub fn into_id(self) -> SchemaId
pub fn try_into_tree(self) -> Option<SchemaIdTree>
Trait Implementations§
source§impl Clone for SchemaIdContainer
impl Clone for SchemaIdContainer
source§fn clone(&self) -> SchemaIdContainer
fn clone(&self) -> SchemaIdContainer
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 SchemaIdContainer
impl Debug for SchemaIdContainer
source§impl<'de> Deserialize<'de> for SchemaIdContainer
impl<'de> Deserialize<'de> for SchemaIdContainer
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 Display for SchemaIdContainer
impl Display for SchemaIdContainer
source§impl From<SchemaId> for SchemaIdContainer
impl From<SchemaId> for SchemaIdContainer
source§impl From<SchemaIdTree> for SchemaIdContainer
impl From<SchemaIdTree> for SchemaIdContainer
source§fn from(tree: SchemaIdTree) -> Self
fn from(tree: SchemaIdTree) -> Self
Converts to this type from the input type.
source§impl Hash for SchemaIdContainer
impl Hash for SchemaIdContainer
source§impl PartialEq<SchemaIdContainer> for SchemaIdContainer
impl PartialEq<SchemaIdContainer> for SchemaIdContainer
source§fn eq(&self, other: &SchemaIdContainer) -> bool
fn eq(&self, other: &SchemaIdContainer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SchemaIdContainer
impl Serialize for SchemaIdContainer
impl Eq for SchemaIdContainer
impl StructuralEq for SchemaIdContainer
impl StructuralPartialEq for SchemaIdContainer
Auto Trait Implementations§
impl RefUnwindSafe for SchemaIdContainer
impl Send for SchemaIdContainer
impl Sync for SchemaIdContainer
impl Unpin for SchemaIdContainer
impl UnwindSafe for SchemaIdContainer
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.