#[repr(i32)]pub enum RelativePosition {
Unknown = 0,
More = 1,
Less = 2,
CrossUp = 3,
CrossDown = 4,
}Expand description
相对位置比较
Variants§
Unknown = 0
未知
More = 1
大于,first位于second的上方
Less = 2
小于,first位于second的下方
CrossUp = 3
升穿,first从下往上穿second
CrossDown = 4
跌穿,first从上往下穿second
Implementations§
Source§impl RelativePosition
impl RelativePosition
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for RelativePosition
impl Clone for RelativePosition
Source§fn clone(&self) -> RelativePosition
fn clone(&self) -> RelativePosition
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 RelativePosition
impl Debug for RelativePosition
Source§impl Default for RelativePosition
impl Default for RelativePosition
Source§fn default() -> RelativePosition
fn default() -> RelativePosition
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RelativePosition
impl<'de> Deserialize<'de> for RelativePosition
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 From<RelativePosition> for i32
impl From<RelativePosition> for i32
Source§fn from(value: RelativePosition) -> i32
fn from(value: RelativePosition) -> i32
Converts to this type from the input type.
Source§impl Hash for RelativePosition
impl Hash for RelativePosition
Source§impl Ord for RelativePosition
impl Ord for RelativePosition
Source§fn cmp(&self, other: &RelativePosition) -> Ordering
fn cmp(&self, other: &RelativePosition) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RelativePosition
impl PartialEq for RelativePosition
Source§impl PartialOrd for RelativePosition
impl PartialOrd for RelativePosition
Source§impl Serialize for RelativePosition
impl Serialize for RelativePosition
Source§impl TryFrom<i32> for RelativePosition
impl TryFrom<i32> for RelativePosition
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<RelativePosition, UnknownEnumValue>
fn try_from(value: i32) -> Result<RelativePosition, UnknownEnumValue>
Performs the conversion.
impl Copy for RelativePosition
impl Eq for RelativePosition
impl StructuralPartialEq for RelativePosition
Auto Trait Implementations§
impl Freeze for RelativePosition
impl RefUnwindSafe for RelativePosition
impl Send for RelativePosition
impl Sync for RelativePosition
impl Unpin for RelativePosition
impl UnwindSafe for RelativePosition
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