pub enum OneOfEntry<'a> {
Comment(Comment<'a>),
Option(Option<'a>),
Field(Field<'a>),
}Expand description
Entries that can appear inside a oneof block.
Variants§
Implementations§
Source§impl OneOfEntry<'_>
impl OneOfEntry<'_>
Sourcepub fn into_owned(self) -> OneOfEntry<'static>
pub fn into_owned(self) -> OneOfEntry<'static>
Copy the structure and clone the original values if it’s not owned.
This is always a deep copy of the structure.
Trait Implementations§
Source§impl<'a> Clone for OneOfEntry<'a>
impl<'a> Clone for OneOfEntry<'a>
Source§fn clone(&self) -> OneOfEntry<'a>
fn clone(&self) -> OneOfEntry<'a>
Returns a duplicate 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<'a> Debug for OneOfEntry<'a>
impl<'a> Debug for OneOfEntry<'a>
Source§impl<'a> From<Comment<'a>> for OneOfEntry<'a>
impl<'a> From<Comment<'a>> for OneOfEntry<'a>
Source§impl<'a> From<Field<'a>> for OneOfEntry<'a>
impl<'a> From<Field<'a>> for OneOfEntry<'a>
Source§impl<'a> From<Option<'a>> for OneOfEntry<'a>
impl<'a> From<Option<'a>> for OneOfEntry<'a>
Source§impl IntoOwned for OneOfEntry<'_>
impl IntoOwned for OneOfEntry<'_>
Source§type Owned = OneOfEntry<'static>
type Owned = OneOfEntry<'static>
The type after obtaining ownership, should be the same as before but with static lifetime.
Source§fn into_owned(self) -> Self::Owned
fn into_owned(self) -> Self::Owned
Copy the structure and clone the original values if it’s not owned. Read more
Source§impl<'a> PartialEq for OneOfEntry<'a>
impl<'a> PartialEq for OneOfEntry<'a>
impl<'a> StructuralPartialEq for OneOfEntry<'a>
Auto Trait Implementations§
impl<'a> Freeze for OneOfEntry<'a>
impl<'a> RefUnwindSafe for OneOfEntry<'a>
impl<'a> Send for OneOfEntry<'a>
impl<'a> Sync for OneOfEntry<'a>
impl<'a> Unpin for OneOfEntry<'a>
impl<'a> UnwindSafe for OneOfEntry<'a>
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