pub enum SchemaIdContainer {
Id(SchemaId),
Tree(SchemaIdTree),
}
Variants
Id(SchemaId)
Tree(SchemaIdTree)
Implementations
sourceimpl 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
sourceimpl Clone for SchemaIdContainer
impl Clone for SchemaIdContainer
sourcefn clone(&self) -> SchemaIdContainer
fn clone(&self) -> SchemaIdContainer
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SchemaIdContainer
impl Debug for SchemaIdContainer
sourceimpl<'de> Deserialize<'de> for SchemaIdContainer
impl<'de> Deserialize<'de> for SchemaIdContainer
sourcefn 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
sourceimpl Display for SchemaIdContainer
impl Display for SchemaIdContainer
sourceimpl From<SchemaId> for SchemaIdContainer
impl From<SchemaId> for SchemaIdContainer
sourceimpl From<SchemaIdTree> for SchemaIdContainer
impl From<SchemaIdTree> for SchemaIdContainer
sourcefn from(tree: SchemaIdTree) -> Self
fn from(tree: SchemaIdTree) -> Self
Converts to this type from the input type.
sourceimpl Hash for SchemaIdContainer
impl Hash for SchemaIdContainer
sourceimpl PartialEq<SchemaIdContainer> for SchemaIdContainer
impl PartialEq<SchemaIdContainer> for SchemaIdContainer
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &SchemaIdContainer) -> bool
fn ne(&self, other: &SchemaIdContainer) -> bool
This method tests for !=
.
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.