<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="API documentation for the Rust `PerpPosition` struct in crate `mango_v4`."><metaname="keywords"content="rust, rustlang, rust-lang, PerpPosition"><title>PerpPosition in mango_v4::state - Rust</title><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../SourceSerif4-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../FiraSans-Regular.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../FiraSans-Medium.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../SourceCodePro-Regular.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../SourceSerif4-Bold.ttf.woff2"><linkrel="preload"as="font"type="font/woff2"crossoriginhref="../../SourceCodePro-Semibold.ttf.woff2"><linkrel="stylesheet"href="../../normalize.css"><linkrel="stylesheet"href="../../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"href="../../ayu.css"disabled><linkrel="stylesheet"href="../../dark.css"disabled><linkrel="stylesheet"href="../../light.css"id="themeStyle"><scriptid="default-settings"></script><scriptsrc="../../storage.js"></script><scriptdefersrc="sidebar-items.js"></script><scriptdefersrc="../../main.js"></script><noscript><linkrel="stylesheet"href="../../noscript.css"></noscript><linkrel="alternate icon"type="image/png"href="../../favicon-16x16.png"><linkrel="alternate icon"type="image/png"href="../../favicon-32x32.png"><linkrel="icon"type="image/svg+xml"href="../../favicon.svg"></head><bodyclass="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="mobile-topbar"><buttonclass="sidebar-menu-toggle">☰</button><aclass="sidebar-logo"href="../../mango_v4/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../../rust-logo.svg"alt="logo"></div></a><h2class="location"></h2></nav><navclass="sidebar"><aclass="sidebar-logo"href="../../mango_v4/index.html"><divclass="logo-container"><imgclass="rust-logo"src="../../rust-logo.svg"alt="logo"></div></a><h2class="location"><ahref="#">PerpPosition</a></h2><divclass="sidebar-elems"><section><divclass="block"><h3class="sidebar-title"><ahref="#fields">Fields</a></h3><ul><li><ahref="#structfield.asks_base_lots">asks_base_lots</a></li><li><ahref="#structfield.avg_entry_price_per_base_lot">avg_entry_price_per_base_lot</a></li><li><ahref="#structfield.base_position_lots">base_position_lots</a></li><li><ahref="#structfield.bids_base_lots">bids_base_lots</a></li><li><ahref="#structfield.cumulative_long_funding">cumulative_long_funding</a></li><li><ahref="#structfield.cumulative_short_funding">cumulative_short_funding</a></li><li><ahref="#structfield.long_settled_funding">long_settled_funding</a></li><li><ahref="#structfield.maker_volume">maker_volume</a></li><li><ahref="#structfield.market_index">market_index</a></li><li><ahref="#structfield.padding">padding</a></li><li><ahref="#structfield.perp_spot_transfers">perp_spot_transfers</a></li><li><ahref="#structfield.quote_position_native">quote_position_native</a></li><li><ahref="#structfield.quote_running_native">quote_running_native</a></li><li><ahref="#structfield.realized_other_pnl_native">realized_other_pnl_native</a></li><li><ahref="#structfield.realized_pnl_for_position_native">realized_pnl_for_position_native</a></li><li><ahref="#structfield.realized_trade_pnl_native">realized_trade_pnl_native</a></li><li><ahref="#structfield.reserved">reserved</a></li><li><ahref="#structfield.settle_pnl_limit_realized_trade">settle_pnl_limit_realized_trade</a></li><li><ahref="#structfield.settle_pnl_limit_settled_in_current_window_native">settle_pnl_limit_settled_in_current_window_native</a></li><li><ahref="#structfield.settle_pnl_limit_window">settl
</details>}</code></pre></div><h2id="fields"class="fields small-section-header">Fields<ahref="#fields"class="anchor"></a></h2><spanid="structfield.market_index"class="structfield small-section-header"><ahref="#structfield.market_index"class="anchor field"></a><code>market_index: <aclass="type"href="type.PerpMarketIndex.html"title="type mango_v4::state::PerpMarketIndex">PerpMarketIndex</a></code></span><spanid="structfield.padding"class="structfield small-section-header"><ahref="#structfield.padding"class="anchor field"></a><code>padding: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.array.html">[</a><aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.array.html">; 2]</a></code></span><spanid="structfield.settle_pnl_limit_window"class="structfield small-section-header"><ahref="#structfield.settle_pnl_limit_window"class="anchor field"></a><code>settle_pnl_limit_window: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.u32.html">u32</a></code></span><divclass="docblock"><p>Index of the current settle pnl limit window</p>
</div><spanid="structfield.settle_pnl_limit_settled_in_current_window_native"class="structfield small-section-header"><ahref="#structfield.settle_pnl_limit_settled_in_current_window_native"class="anchor field"></a><code>settle_pnl_limit_settled_in_current_window_native: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a></code></span><divclass="docblock"><p>Amount of realized trade pnl and unrealized pnl that was already settled this window.</p>
</div><spanid="structfield.base_position_lots"class="structfield small-section-header"><ahref="#structfield.base_position_lots"class="anchor field"></a><code>base_position_lots: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a></code></span><divclass="docblock"><p>Active position size, measured in base lots</p>
</div><spanid="structfield.quote_position_native"class="structfield small-section-header"><ahref="#structfield.quote_position_native"class="anchor field"></a><code>quote_position_native: <aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a></code></span><divclass="docblock"><p>Active position in quote (conversation rate is that of the time the order was settled)
</div><spanid="structfield.quote_running_native"class="structfield small-section-header"><ahref="#structfield.quote_running_native"class="anchor field"></a><code>quote_running_native: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a></code></span><divclass="docblock"><p>Tracks what the position is to calculate average entry & break even price</p>
</div><spanid="structfield.long_settled_funding"class="structfield small-section-header"><ahref="#structfield.long_settled_funding"class="anchor field"></a><code>long_settled_funding: <aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a></code></span><divclass="docblock"><p>Already settled long funding</p>
</div><spanid="structfield.short_settled_funding"class="structfield small-section-header"><ahref="#structfield.short_settled_funding"class="anchor field"></a><code>short_settled_funding: <aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a></code></span><divclass="docblock"><p>Already settled short funding</p>
</div><spanid="structfield.bids_base_lots"class="structfield small-section-header"><ahref="#structfield.bids_base_lots"class="anchor field"></a><code>bids_base_lots: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a></code></span><divclass="docblock"><p>Base lots in open bids</p>
</div><spanid="structfield.asks_base_lots"class="structfield small-section-header"><ahref="#structfield.asks_base_lots"class="anchor field"></a><code>asks_base_lots: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a></code></span><divclass="docblock"><p>Base lots in open asks</p>
</div><spanid="structfield.taker_base_lots"class="structfield small-section-header"><ahref="#structfield.taker_base_lots"class="anchor field"></a><code>taker_base_lots: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a></code></span><divclass="docblock"><p>Amount of base lots on the EventQueue waiting to be processed</p>
</div><spanid="structfield.taker_quote_lots"class="structfield small-section-header"><ahref="#structfield.taker_quote_lots"class="anchor field"></a><code>taker_quote_lots: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a></code></span><divclass="docblock"><p>Amount of quote lots on the EventQueue waiting to be processed</p>
</div><spanid="structfield.cumulative_long_funding"class="structfield small-section-header"><ahref="#structfield.cumulative_long_funding"class="anchor field"></a><code>cumulative_long_funding: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.f64.html">f64</a></code></span><divclass="docblock"><p>Cumulative long funding in quote native units.
</div><spanid="structfield.cumulative_short_funding"class="structfield small-section-header"><ahref="#structfield.cumulative_short_funding"class="anchor field"></a><code>cumulative_short_funding: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.f64.html">f64</a></code></span><divclass="docblock"><p>Cumulative short funding in quote native units
</div><spanid="structfield.perp_spot_transfers"class="structfield small-section-header"><ahref="#structfield.perp_spot_transfers"class="anchor field"></a><code>perp_spot_transfers: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a></code></span><divclass="docblock"><p>Cumulative number of quote native units transfered from the perp position
</div><spanid="structfield.avg_entry_price_per_base_lot"class="structfield small-section-header"><ahref="#structfield.avg_entry_price_per_base_lot"class="anchor field"></a><code>avg_entry_price_per_base_lot: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.f64.html">f64</a></code></span><divclass="docblock"><p>The native average entry price for the base lots of the current position.
</div><spanid="structfield.realized_trade_pnl_native"class="structfield small-section-header"><ahref="#structfield.realized_trade_pnl_native"class="anchor field"></a><code>realized_trade_pnl_native: <aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a></code></span><divclass="docblock"><p>Amount of pnl that was realized by bringing the base position closer to 0.</p>
</div><spanid="structfield.realized_other_pnl_native"class="structfield small-section-header"><ahref="#structfield.realized_other_pnl_native"class="anchor field"></a><code>realized_other_pnl_native: <aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a></code></span><divclass="docblock"><p>Amount of pnl realized from fees, funding and liquidation.</p>
</div><spanid="structfield.realized_pnl_for_position_native"class="structfield small-section-header"><ahref="#structfield.realized_pnl_for_position_native"class="anchor field"></a><code>realized_pnl_for_position_native: <aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a></code></span><divclass="docblock"><p>Trade pnl, fees, funding that were added over the current position’s lifetime.</p>
</div><spanid="structfield.reserved"class="structfield small-section-header"><ahref="#structfield.reserved"class="anchor field"></a><code>reserved: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.array.html">[</a><aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.u8.html">u8</a><aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.array.html">; 88]</a></code></span><h2id="implementations"class="small-section-header">Implementations<ahref="#implementations"class="anchor"></a></h2><divid="implementations-list"><detailsclass="rustdoc-toggle implementors-toggle"open><summary><sectionid="impl-PerpPosition"class="impl has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#307-782">source</a><ahref="#impl-PerpPosition"class="anchor"></a><h3class="code-header in-band">impl <aclass="struct"href="struct.PerpPosition.html"title="struct mango_v4::state::PerpPosition">PerpPosition</a></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.add_taker_trade"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#309-320">source</a><h4class="code-header">pub fn <ahref="#method.add_taker_trade"class="fnname">add_taker_trade</a>(&mut self, side: <aclass="enum"href="enum.Side.html"title="enum mango_v4::state::Side">Side</a>, base_lots: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a>, quote_lots: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a>)</h4></section></summary><divclass="docblock"><p>Add taker trade after it has been matched but before it has been process on EventQueue</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.remove_taker_trade"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#322-325">source</a><h4class="code-header">pub fn <ahref="#method.remove_taker_trade"class="fnname">remove_taker_trade</a>(&mut self, base_change: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a>, quote_change: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a>)</h4></section></summary><divclass="docblock"><p>Remove taker trade after it has been processed on EventQueue</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.settle_funding"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#376-390">source</a><h4class="code-header">pub fn <ahref="#method.settle_funding"class="fnname">settle_funding</a>(&mut self, perp_market: &<aclass="struct"href="struct.PerpMarket.html"title="struct mango_v4::state::PerpMarket">PerpMarket</a>)</h4></section></summary><divclass="docblock"><p>Move unrealized funding payments into the quote_position</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.record_trade"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#574-584">source</a><h4class="code-header">pub fn <ahref="#method.record_trade"class="fnname">record_trade</a>(<br> &mut self,<br> perp_market: &mut <aclass="struct"href="struct.PerpMarket.html"title="struct mango_v4::state::PerpMarket">PerpMarket</a>,<br> base_change: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a>,<br> quote_change_native: <aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a><br>)</h4></section></summary><divclass="docblock"><p>Change the base and quote positions as the result of a trade</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.has_open_orders"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#594-596">source</a><h4class="code-header">pub fn <ahref="#method.has_open_orders"class="fnname">has_open_orders</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Does the user have any orders on the book?</p>
</div></details><sectionid="method.has_open_taker_fills"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#599-601">source</a><h4class="code-header">pub fn <ahref="#method.has_open_taker_fills"class="fnname">has_open_taker_fills</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.bool.html">bool</a></h4></section><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.has_open_orders_or_fills"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#604-606">source</a><h4class="code-header">pub fn <ahref="#method.has_open_orders_or_fills"class="fnname">has_open_orders_or_fills</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass="docblock"><p>Are there any open orders or fills that haven’t been processed yet?</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.avg_entry_price"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#609-612">source</a><h4class="code-header">pub fn <ahref="#method.avg_entry_price"class="fnname">avg_entry_price</a>(&self, market: &<aclass="struct"href="struct.PerpMarket.html"title="struct mango_v4::state::PerpMarket">PerpMarket</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.f64.html">f64</a></h4></section></summary><divclass="docblock"><p>Calculate the average entry price of the position, in native/native units</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.break_even_price"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#615-622">source</a><h4class="code-header">pub fn <ahref="#method.break_even_price"class="fnname">break_even_price</a>(&self, market: &<aclass="struct"href="struct.PerpMarket.html"title="struct mango_v4::state::PerpMarket">PerpMarket</a>) -><aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.f64.html">f64</a></h4></section></summary><divclass="docblock"><p>Calculate the break even price of the position, in native/native units</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.unsettled_pnl"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#625-630">source</a><h4class="code-header">pub fn <ahref="#method.unsettled_pnl"class="fnname">unsettled_pnl</a>(<br> &self,<br> perp_market: &<aclass="struct"href="struct.PerpMarket.html"title="struct mango_v4::state::PerpMarket">PerpMarket</a>,<br> price: <aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a><br>) -> Result<<aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a>></h4></section></summary><divclass="docblock"><p>Calculate the PnL of the position for a given price</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.update_settle_limit"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#634-645">source</a><h4class="code-header">pub fn <ahref="#method.update_settle_limit"class="fnname">update_settle_limit</a>(&mut self, market: &<aclass="struct"href="struct.PerpMarket.html"title="struct mango_v4::state::PerpMarket">PerpMarket</a>, now_ts: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.u64.html">u64</a>)</h4></section></summary><divclass="docblock"><p>Updates the perp pnl limit time windowing, resetting the amount
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.settle_limit"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#656-685">source</a><h4class="code-header">pub fn <ahref="#method.settle_limit"class="fnname">settle_limit</a>(&self, market: &<aclass="struct"href="struct.PerpMarket.html"title="struct mango_v4::state::PerpMarket">PerpMarket</a>) -> (<aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a>)</h4></section></summary><divclass="docblock"><p>Returns the (min_pnl, max_pnl) range of quote-native pnl that can be settled this window.</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.available_settle_limit"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#692-705">source</a><h4class="code-header">pub fn <ahref="#method.available_settle_limit"class="fnname">available_settle_limit</a>(&self, market: &<aclass="struct"href="struct.PerpMarket.html"title="struct mango_v4::state::PerpMarket">PerpMarket</a>) -> (<aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a>, <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.i64.html">i64</a>)</h4></section></summary><divclass="docblock"><p>Returns the (min_pnl, max_pnl) range of quote-native pnl that may still be settled
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.record_trading_fee"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#764-768">source</a><h4class="code-header">pub fn <ahref="#method.record_trading_fee"class="fnname">record_trading_fee</a>(&mut self, fee: <aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a>)</h4></section></summary><divclass="docblock"><p>Update perp position for a maker/taker fee payment</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.record_liquidation_quote_change"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#771-774">source</a><h4class="code-header">pub fn <ahref="#method.record_liquidation_quote_change"class="fnname">record_liquidation_quote_change</a>(&mut self, change: <aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a>)</h4></section></summary><divclass="docblock"><p>Adds immediately-settleable realized pnl when a liqor takes over pnl during liquidation</p>
</div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.record_liquidation_pnl_takeover"class="method has-srclink"><aclass="srclink rightside"href="../../src/mango_v4/state/mango_account_components.rs.html#777-781">source</a><h4class="code-header">pub fn <ahref="#method.record_liquidation_pnl_takeover"class="fnname">record_liquidation_pnl_takeover</a>(<br> &mut self,<br> change: <aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a>,<br> recurring_limit: <aclass="type"href="https://docs.rs/fixed/~1.11/fixed/types/type.I80F48.html"title="type fixed::types::I80F48">I80F48</a><br>)</h4></section></summary><divclass="docblock"><p>Adds to the quote position and adds a recurring (“realized trade”) settle limit</p>
<ahref="CheckedBitPattern::is_valid_bit_pattern"><code>is_valid_bit_pattern</code></a>. <a>Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.is_valid_bit_pattern"class="method trait-impl has-srclink"><ahref="#method.is_valid_bit_pattern"class="anchor"></a><h4class="code-header">fn <aclass="fnname">is_valid_bit_pattern</a>(_bits: <aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.reference.html">&</a>T) -><aclass="primitive"href="https://doc.rust-lang.org/1.65.0/std/primitive.bool.html">bool</a></h4></section></summary><divclass='docblock'>If this function returns true, then it must be valid to reinterpret <code>bits</code>
</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-Instrument-for-PerpPosition"class="impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#276">source</a><ahref="#impl-Instrument-for-PerpPosition"class="anchor"></a><h3class="code-header in-band">impl<T><aclass="trait"href="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html"title="trait tracing::instrument::Instrument">Instrument</a> for T</h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.instrument"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#82">source</a><ahref="#method.instrument"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument"class="fnname">instrument</a>(self, span: <aclass="struct"href="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html"title="struct tracing::span::Span">Span</a>) -><aclass="struct"href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><divclass='docblock'>Instruments this type with the provided <ahref="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html"title="Span"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.instrument">Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.in_current_span"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#121">source</a><ahref="#method.in_current_span"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.Instrument.html#method.in_current_span"class="fnname">in_current_span</a>(self) -><aclass="struct"href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.Instrumented.html"title="struct tracing::instrument::Instrumented">Instrumented</a><Self></h4></section></summary><divclass='docblock'>Instruments this type with the <ahref="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html#method.current">current</a><ahref="https://docs.rs/tracing/0.1.37/tracing/span/struct.Span.html"><code>Span</code></a>, returning an
<ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html"title="WithDispatch"><code>WithDispatch</code></a> wrapper. <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_subscriber">Read more</a></div></details><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.with_current_subscriber"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/tracing/0.1.37/src/tracing/instrument.rs.html#221">source</a><ahref="#method.with_current_subscriber"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber"class="fnname">with_current_subscriber</a>(self) -><aclass="struct"href="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html"title="struct tracing::instrument::WithDispatch">WithDispatch</a><Self></h4></section></summary><divclass='docblock'>Attaches the current <ahref="https://docs.rs/tracing/0.1.37/tracing/dispatcher/index.html#setting-the-default-subscriber">default</a><ahref="https://docs.rs/tracing-core/0.1.22/tracing_core/subscriber/trait.Subscriber.html"><code>Subscriber</code></a> to this type, returning a
<ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/struct.WithDispatch.html"title="WithDispatch"><code>WithDispatch</code></a> wrapper. <ahref="https://docs.rs/tracing/0.1.37/tracing/instrument/trait.WithSubscriber.html#method.with_current_subscriber">Read more</a></div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-WrappingAs-for-PerpPosition"class="impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/az/~1.2/src/az/lib.rs.html#818">source</a><ahref="#impl-WrappingAs-for-PerpPosition"class="anchor"></a><h3class="code-header in-band">impl<T><aclass="trait"href="https://docs.rs/az/~1.2/az/trait.WrappingAs.html"title="trait az::WrappingAs">WrappingAs</a> for T</h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.wrapping_as"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/az/~1.2/src/az/lib.rs.html#821-823">source</a><ahref="#method.wrapping_as"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/az/~1.2/az/trait.WrappingAs.html#tymethod.wrapping_as"class="fnname">wrapping_as</a><Dst>(self) -> Dst<spanclass="where fmt-newline">where<br> T: <aclass="trait"href="https://docs.rs/az/~1.2/az/trait.WrappingCast.html"title="trait az::WrappingCast">WrappingCast</a><Dst>,</span></h4></section></summary><divclass='docblock'>Casts the value.</div></details></div></details><detailsclass="rustdoc-toggle implementors-toggle"><summary><sectionid="impl-WrappingCastFrom%3CSrc%3E-for-PerpPosition"class="impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/az/~1.2/src/az/lib.rs.html#438">source</a><ahref="#impl-WrappingCastFrom%3CSrc%3E-for-PerpPosition"class="anchor"></a><h3class="code-header in-band">impl<Src, Dst><aclass="trait"href="https://docs.rs/az/~1.2/az/trait.WrappingCastFrom.html"title="trait az::WrappingCastFrom">WrappingCastFrom</a><Src> for Dst<spanclass="where fmt-newline">where<br> Src: <aclass="trait"href="https://docs.rs/az/~1.2/az/trait.WrappingCast.html"title="trait az::WrappingCast">WrappingCast</a><Dst>,</span></h3></section></summary><divclass="impl-items"><detailsclass="rustdoc-toggle method-toggle"open><summary><sectionid="method.wrapping_cast_from"class="method trait-impl has-srclink"><aclass="srclink rightside"href="https://docs.rs/az/~1.2/src/az/lib.rs.html#441">source</a><ahref="#method.wrapping_cast_from"class="anchor"></a><h4class="code-header">fn <ahref="https://docs.rs/az/~1.2/az/trait.WrappingCastFrom.html#tymethod.wrapping_cast_from"class="fnname">wrapping_cast_from</a>(src: Src) -> Dst</h4></section></summary><divclass='docblock'>Casts the value.</div></details></div></details><sectionid="impl-AnyBitPattern-for-PerpPosition"class="impl has-srclink"><ahref="#impl-AnyBitPattern-for-PerpPosition"class="anchor"></a><h3class="code-header in-band">impl<T> AnyBitPattern for T<spanclass="where fmt-newline">where<br> T: Pod,</span></h3></section><sectionid="impl-NoUninit-for-PerpPosition"class="impl has-srclink"><ahref="#impl-NoUninit-for-PerpPosition"class="anchor"></a><h3class="code-header in-band">impl<T> NoUninit for T<spanclass="where fmt-newline">where<br> T: Pod,</span></h3></section></div></section></div></main><divid="rustdoc-vars"data-root-path="../../"data-current-crate="mango_v4"data-themes="ayu,dark,light"data-resource-suffix=""data-rustdoc-version="1.65.0 (897e37553 2022-11-02)"></div></body></html>