Enum koto_parser::IdOrString
source · pub enum IdOrString {
Id(ConstantIndex),
Str(AstString),
}
Expand description
Either an Id or a String
Variants§
Id(ConstantIndex)
Str(AstString)
Trait Implementations§
source§impl Clone for IdOrString
impl Clone for IdOrString
source§fn clone(&self) -> IdOrString
fn clone(&self) -> IdOrString
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 IdOrString
impl Debug for IdOrString
source§impl From<AstString> for IdOrString
impl From<AstString> for IdOrString
source§impl From<u32> for IdOrString
impl From<u32> for IdOrString
source§fn from(id: ConstantIndex) -> Self
fn from(id: ConstantIndex) -> Self
Converts to this type from the input type.
source§impl PartialEq for IdOrString
impl PartialEq for IdOrString
source§fn eq(&self, other: &IdOrString) -> bool
fn eq(&self, other: &IdOrString) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for IdOrString
impl StructuralPartialEq for IdOrString
Auto Trait Implementations§
impl Freeze for IdOrString
impl RefUnwindSafe for IdOrString
impl Send for IdOrString
impl Sync for IdOrString
impl Unpin for IdOrString
impl UnwindSafe for IdOrString
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