Struct dex_v4::state::UserAccount
source · pub struct UserAccount<'a> {
pub header: &'a mut UserAccountHeader,
/* private fields */
}
Fields
header: &'a mut UserAccountHeader
Implementations
sourceimpl<'a> UserAccount<'a>
impl<'a> UserAccount<'a>
pub fn from_buffer(buf: &'a mut [u8]) -> Result<Self, ProgramError>
pub fn from_buffer_unchecked(buf: &'a mut [u8]) -> Result<Self, ProgramError>
sourceimpl<'a> UserAccount<'a>
impl<'a> UserAccount<'a>
pub fn read_order(&self, order_index: usize) -> Result<Order, DexError>
pub fn remove_order(&mut self, order_index: usize) -> Result<(), DexError>
pub fn add_order(&mut self, order: Order) -> Result<(), DexError>
pub fn find_order_index(&self, order_id: u128) -> Result<usize, DexError>
pub fn find_order_id_and_index_by_client_id(
&self,
client_order_id: u128
) -> Result<(u64, u128), DexError>
Auto Trait Implementations
impl<'a> RefUnwindSafe for UserAccount<'a>
impl<'a> Send for UserAccount<'a>
impl<'a> Sync for UserAccount<'a>
impl<'a> Unpin for UserAccount<'a>
impl<'a> !UnwindSafe for UserAccount<'a>
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more