pub struct Bracket { /* private fields */ }Expand description
ProjectX bracket-leg configuration.
Placement accepts bracket legs only in the account’s Auto OCO Brackets
mode. Position Brackets mode rejects them with provider code 2, even
though the response can include an ID for the rejected order record.
Implementations§
Source§impl Bracket
impl Bracket
Sourcepub fn new(
ticks: i32,
order_type: OrderType,
) -> Result<Self, RequestValidationError>
pub fn new( ticks: i32, order_type: OrderType, ) -> Result<Self, RequestValidationError>
Creates a bracket leg with a positive distance in ticks.
§Errors
Returns an error when ticks is zero or negative, or when order_type
is not documented by the provider for bracket requests.
Sourcepub const fn order_type(&self) -> OrderType
pub const fn order_type(&self) -> OrderType
Returns the bracket order type.
Trait Implementations§
impl Eq for Bracket
impl StructuralPartialEq for Bracket
Auto Trait Implementations§
impl Freeze for Bracket
impl RefUnwindSafe for Bracket
impl Send for Bracket
impl Sync for Bracket
impl Unpin for Bracket
impl UnsafeUnpin for Bracket
impl UnwindSafe for Bracket
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