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 unsafe fn into_name_unchecked(self) -> String
pub unsafe fn into_name_unchecked(self) -> String
Unchecked return of the inner fields of IndirectionKind::Name.
§Safety
Results in undefined behavior when it is the incorrect variant.
Sourcepub unsafe fn as_name_unchecked(&self) -> &String
pub unsafe fn as_name_unchecked(&self) -> &String
Unchecked reference of the inner fields of IndirectionKind::Name.
§Safety
Results in undefined behavior when it is the incorrect variant.
Sourcepub unsafe fn as_name_mut_unchecked(&mut self) -> &mut String
pub unsafe fn as_name_mut_unchecked(&mut self) -> &mut String
Unchecked mutable reference of the inner fields of IndirectionKind::Name.
§Safety
Results in undefined behavior when it is the incorrect variant.
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
Sourcepub unsafe fn into_position_unchecked(self) -> i64
pub unsafe fn into_position_unchecked(self) -> i64
Unchecked return of the inner fields of IndirectionKind::Position.
§Safety
Results in undefined behavior when it is the incorrect variant.
Sourcepub unsafe fn as_position_unchecked(&self) -> &i64
pub unsafe fn as_position_unchecked(&self) -> &i64
Unchecked reference of the inner fields of IndirectionKind::Position.
§Safety
Results in undefined behavior when it is the incorrect variant.
Sourcepub unsafe fn as_position_mut_unchecked(&mut self) -> &mut i64
pub unsafe fn as_position_mut_unchecked(&mut self) -> &mut i64
Unchecked mutable reference of the inner fields of IndirectionKind::Position.
§Safety
Results in undefined behavior when it is the incorrect variant.
Trait Implementations§
Source§impl Clone for IndirectionKind
impl Clone for IndirectionKind
Source§fn clone(&self) -> IndirectionKind
fn clone(&self) -> IndirectionKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
Source§impl JsonSchema for IndirectionKind
impl JsonSchema for IndirectionKind
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
WrappingSpan::make_wrapped to wrap an AST node in a span.