Enum substrate::geometry::orientation::NamedOrientation
source · #[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
.
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§fn eq(&self, other: &NamedOrientation) -> bool
fn eq(&self, other: &NamedOrientation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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 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, U> CustomHardwareType<Flipped<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
impl<T, U> CustomHardwareType<Flipped<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
source§fn from_layout_type(other: &Flipped<T>) -> U
fn from_layout_type(other: &Flipped<T>) -> U
Creates this layout type from another layout type.
source§impl<T, U> CustomHardwareType<InOut<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
impl<T, U> CustomHardwareType<InOut<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
source§fn from_layout_type(other: &InOut<T>) -> U
fn from_layout_type(other: &InOut<T>) -> U
Creates this layout type from another layout type.
source§impl<T, U> CustomHardwareType<Input<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
impl<T, U> CustomHardwareType<Input<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
source§fn from_layout_type(other: &Input<T>) -> U
fn from_layout_type(other: &Input<T>) -> U
Creates this layout type from another layout type.
source§impl<T, U> CustomHardwareType<Output<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
impl<T, U> CustomHardwareType<Output<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
source§fn from_layout_type(other: &Output<T>) -> U
fn from_layout_type(other: &Output<T>) -> U
Creates this layout type from another layout type.
§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>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<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>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
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)
Convert
&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)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§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<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