pub struct PartialCloseContract { /* private fields */ }Expand description
Partial-position close parameters.
Implementations§
Source§impl PartialCloseContract
impl PartialCloseContract
Sourcepub fn new(
account_id: AccountId,
contract_id: ContractId,
size: i32,
) -> Result<Self, RequestValidationError>
pub fn new( account_id: AccountId, contract_id: ContractId, size: i32, ) -> Result<Self, RequestValidationError>
Creates a partial-position close with a positive quantity.
§Errors
Returns RequestValidationError::NonPositivePartialCloseSize when
size is zero or negative.
Sourcepub const fn account_id(&self) -> AccountId
pub const fn account_id(&self) -> AccountId
Returns the provider account.
Sourcepub const fn contract_id(&self) -> &ContractId
pub const fn contract_id(&self) -> &ContractId
Borrows the provider contract.
Trait Implementations§
Source§impl Clone for PartialCloseContract
impl Clone for PartialCloseContract
Source§fn clone(&self) -> PartialCloseContract
fn clone(&self) -> PartialCloseContract
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PartialCloseContract
impl Debug for PartialCloseContract
impl Eq for PartialCloseContract
Source§impl PartialEq for PartialCloseContract
impl PartialEq for PartialCloseContract
Source§impl Serialize for PartialCloseContract
impl Serialize for PartialCloseContract
impl StructuralPartialEq for PartialCloseContract
Auto Trait Implementations§
impl Freeze for PartialCloseContract
impl RefUnwindSafe for PartialCloseContract
impl Send for PartialCloseContract
impl Sync for PartialCloseContract
impl Unpin for PartialCloseContract
impl UnsafeUnpin for PartialCloseContract
impl UnwindSafe for PartialCloseContract
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