Enum architect_api::utils::dir::Dir
source · pub enum Dir {
Buy,
Sell,
}Expand description
An order side/direction or a trade execution side/direction. In GraphQL these are serialized as “buy” or “sell”.
Variants§
Implementations§
source§impl Dir
impl Dir
pub fn to_str_uppercase(&self) -> &'static str
pub fn from_str_uppercase(s: &str) -> Result<Self>
pub fn to_str_lowercase(&self) -> &'static str
pub fn from_str_lowercase(s: &str) -> Result<Self>
pub fn position_sign(&self) -> Decimal
Trait Implementations§
source§impl<'de> Deserialize<'de> for Dir
impl<'de> Deserialize<'de> for Dir
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 ToSql for Dir
impl ToSql for Dir
source§fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql_checked( &self, ty: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
An adaptor method used internally by Rust-Postgres. Read more
source§fn to_sql(
&self,
ty: &Type,
out: &mut BytesMut,
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql( &self, ty: &Type, out: &mut BytesMut, ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Converts the value of
self into the binary format of the specified
Postgres Type, appending it to out. Read moresource§fn accepts(ty: &Type) -> bool
fn accepts(ty: &Type) -> bool
Determines if a value of this type can be converted to the specified
Postgres
Type.source§fn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
impl Copy for Dir
impl Eq for Dir
impl StructuralPartialEq for Dir
Auto Trait Implementations§
impl Freeze for Dir
impl RefUnwindSafe for Dir
impl Send for Dir
impl Sync for Dir
impl Unpin for Dir
impl UnwindSafe for Dir
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> BorrowToSql for Twhere
T: ToSql,
impl<T> BorrowToSql for Twhere
T: ToSql,
source§fn borrow_to_sql(&self) -> &dyn ToSql
fn borrow_to_sql(&self) -> &dyn ToSql
Returns a reference to
self as a ToSql trait object.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.