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 JsonSchema for IndirectionKind
impl JsonSchema for IndirectionKind
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$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 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
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>
Converts
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>
Converts
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 more