#[non_exhaustive]pub struct MarginCall {
pub level: MarginCallLevel,
pub threshold: Decimal,
pub updated: Option<Timestamp>,
}Expand description
Margin call of an account: the margin level at which the account is notified.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.level: MarginCallLevelWhich margin call of the account this is.
threshold: DecimalMargin level at or below which the margin call is triggered, as a ratio of equity to used margin: 1.5 stands for 150 %.
updated: Option<Timestamp>Moment the margin call was last changed.
Implementations§
Source§impl MarginCall
impl MarginCall
Sourcepub const fn new(level: MarginCallLevel, threshold: Decimal) -> Self
pub const fn new(level: MarginCallLevel, threshold: Decimal) -> Self
Describes a margin call with the given threshold, a ratio of equity to used margin.
Trait Implementations§
Source§impl Clone for MarginCall
impl Clone for MarginCall
impl Copy for MarginCall
Source§impl Debug for MarginCall
impl Debug for MarginCall
impl Eq for MarginCall
Source§impl Hash for MarginCall
impl Hash for MarginCall
Source§impl PartialEq for MarginCall
impl PartialEq for MarginCall
impl StructuralPartialEq for MarginCall
Source§impl TryFrom<ProtoOaMarginCall> for MarginCall
impl TryFrom<ProtoOaMarginCall> for MarginCall
Source§type Error = ValueError
type Error = ValueError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Forget for MarginCall
impl Freeze for MarginCall
impl Move for MarginCall
impl RefUnwindSafe for MarginCall
impl Send for MarginCall
impl Sync for MarginCall
impl Unpin for MarginCall
impl UnsafeUnpin for MarginCall
impl UnwindSafe for MarginCall
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