pub enum AccountAny {
Margin(MarginAccount),
Cash(CashAccount),
}
Variants§
Margin(MarginAccount)
Cash(CashAccount)
Implementations§
Source§impl AccountAny
impl AccountAny
pub fn id(&self) -> AccountId
pub fn last_event(&self) -> Option<AccountState>
pub fn events(&self) -> Vec<AccountState>
pub fn apply(&mut self, event: AccountState)
pub fn from_events(events: Vec<AccountState>) -> Result<Self>
Trait Implementations§
Source§impl Clone for AccountAny
impl Clone for AccountAny
Source§fn clone(&self) -> AccountAny
fn clone(&self) -> AccountAny
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 AccountAny
impl Debug for AccountAny
Source§impl Default for AccountAny
impl Default for AccountAny
Source§fn default() -> Self
fn default() -> Self
Creates a new default AccountAny
instance.
Source§impl<'de> Deserialize<'de> for AccountAny
impl<'de> Deserialize<'de> for AccountAny
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<AccountState> for AccountAny
impl From<AccountState> for AccountAny
Source§fn from(event: AccountState) -> Self
fn from(event: AccountState) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AccountAny
impl PartialEq for AccountAny
Auto Trait Implementations§
impl Freeze for AccountAny
impl RefUnwindSafe for AccountAny
impl Send for AccountAny
impl Sync for AccountAny
impl Unpin for AccountAny
impl UnwindSafe for AccountAny
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