pub enum IndirectionKind {
Name(String),
Position(i64),
Star,
}
Variants§
Implementations§
Source§impl IndirectionKind
impl IndirectionKind
Sourcepub fn as_name_mut(&mut self) -> Option<&mut String>
pub fn as_name_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a IndirectionKind::Name
, otherwise None
Sourcepub fn as_name(&self) -> Option<&String>
pub fn as_name(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a IndirectionKind::Name
, otherwise None
Sourcepub fn into_name(self) -> Result<String, Self>
pub fn into_name(self) -> Result<String, Self>
Returns the inner fields if this is a IndirectionKind::Name
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_position(&self) -> bool
pub fn is_position(&self) -> bool
Returns true if this is a IndirectionKind::Position
, otherwise false
Sourcepub fn as_position_mut(&mut self) -> Option<&mut i64>
pub fn as_position_mut(&mut self) -> Option<&mut i64>
Optionally returns mutable references to the inner fields if this is a IndirectionKind::Position
, otherwise None
Sourcepub fn as_position(&self) -> Option<&i64>
pub fn as_position(&self) -> Option<&i64>
Optionally returns references to the inner fields if this is a IndirectionKind::Position
, otherwise None
Sourcepub fn into_position(self) -> Result<i64, Self>
pub fn into_position(self) -> Result<i64, Self>
Returns the inner fields if this is a IndirectionKind::Position
, otherwise returns back the enum in the Err
case of the result
Trait Implementations§
Source§impl Clone for IndirectionKind
impl Clone for IndirectionKind
Source§fn clone(&self) -> IndirectionKind
fn clone(&self) -> IndirectionKind
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 Debug for IndirectionKind
impl Debug for IndirectionKind
Source§impl<'de> Deserialize<'de> for IndirectionKind
impl<'de> Deserialize<'de> for IndirectionKind
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 IndirectionKind
impl PartialEq for IndirectionKind
Source§impl Serialize for IndirectionKind
impl Serialize for IndirectionKind
impl StructuralPartialEq for IndirectionKind
Auto Trait Implementations§
impl Freeze for IndirectionKind
impl RefUnwindSafe for IndirectionKind
impl Send for IndirectionKind
impl Sync for IndirectionKind
impl Unpin for IndirectionKind
impl UnwindSafe for IndirectionKind
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