#[non_exhaustive]pub enum NamedOrientation {
R0,
ReflectVert,
ReflectHoriz,
R90,
R180,
R270,
R90Cw,
R180Cw,
R270Cw,
FlipYx,
FlipMinusYx,
}
Expand description
A named orientation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
R0
No rotations or reflections.
ReflectVert
Reflect vertically (ie. about the x-axis).
ReflectHoriz
Reflect horizontally (ie. about the y-axis).
R90
Rotate 90 degrees counter-clockwise.
R180
Rotate 180 degrees counter-clockwise.
R270
Rotate 270 degrees counter-clockwise.
R90Cw
Rotate 90 degrees clockwise.
R180Cw
Rotate 180 degrees clockwise.
R270Cw
Rotate 270 degrees clockwise.
FlipYx
Flip across the line y = x.
FlipMinusYx
Flip across the line y = -x.
Implementations§
Source§impl NamedOrientation
impl NamedOrientation
Sourcepub fn all_rectangular() -> [NamedOrientation; 8]
pub fn all_rectangular() -> [NamedOrientation; 8]
Returns a slice of all 8 possible named rectangular orientations.
Users should not rely upon the order of the orientations returned.
Sourcepub fn into_orientation(self) -> Orientation
pub fn into_orientation(self) -> Orientation
Converts this named orientation into a regular Orientation
.
Sourcepub fn from_orientation(orientation: Orientation) -> NamedOrientation
pub fn from_orientation(orientation: Orientation) -> NamedOrientation
Converts the given orientation to a named orientation.
Trait Implementations§
Source§impl Clone for NamedOrientation
impl Clone for NamedOrientation
Source§fn clone(&self) -> NamedOrientation
fn clone(&self) -> NamedOrientation
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 NamedOrientation
impl Debug for NamedOrientation
Source§impl Default for NamedOrientation
impl Default for NamedOrientation
Source§fn default() -> NamedOrientation
fn default() -> NamedOrientation
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NamedOrientation
impl<'de> Deserialize<'de> for NamedOrientation
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NamedOrientation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NamedOrientation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<NamedOrientation> for Orientation
impl From<NamedOrientation> for Orientation
Source§fn from(value: NamedOrientation) -> Orientation
fn from(value: NamedOrientation) -> Orientation
Converts to this type from the input type.
Source§impl Hash for NamedOrientation
impl Hash for NamedOrientation
Source§impl PartialEq for NamedOrientation
impl PartialEq for NamedOrientation
Source§impl Serialize for NamedOrientation
impl Serialize for NamedOrientation
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for NamedOrientation
impl Eq for NamedOrientation
impl StructuralPartialEq for NamedOrientation
Auto Trait Implementations§
impl Freeze for NamedOrientation
impl RefUnwindSafe for NamedOrientation
impl Send for NamedOrientation
impl Sync for NamedOrientation
impl Unpin for NamedOrientation
impl UnwindSafe for NamedOrientation
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request