pub struct RamsesPositionView {
pub token_id: Uint<256, 4>,
pub token0: Address,
pub token1: Address,
pub tick_spacing: i32,
pub tick_lower: i32,
pub tick_upper: i32,
pub liquidity: u128,
pub fee_growth_inside_0_last_x128: Uint<256, 4>,
pub fee_growth_inside_1_last_x128: Uint<256, 4>,
pub tokens_owed_0_stale: u128,
pub tokens_owed_1_stale: u128,
}Expand description
Faithful Rust mirror of the Ramses-family NFPM 10-field positions()
return tuple, plus the caller-supplied token_id echoed as the first
field for round-tripping.
Fields§
§token_id: Uint<256, 4>NFT token ID this position belongs to. Echoed from caller input.
token0: AddressPool token0.
token1: AddressPool token1.
tick_spacing: i32Pool tick spacing (Ramses-family NFPM stores this per-position; V3 and Algebra do not).
tick_lower: i32Lower tick, sign-extended from int24.
tick_upper: i32Upper tick, sign-extended from int24.
liquidity: u128Position liquidity.
fee_growth_inside_0_last_x128: Uint<256, 4>Last-touch fee-growth snapshot for token0.
fee_growth_inside_1_last_x128: Uint<256, 4>Last-touch fee-growth snapshot for token1.
tokens_owed_0_stale: u128Stale token0 owed snapshot from NFPM.
tokens_owed_1_stale: u128Stale token1 owed snapshot from NFPM.
Implementations§
Source§impl RamsesPositionView
impl RamsesPositionView
Sourcepub fn from_nfpm_returns(
token_id: Uint<256, 4>,
ret: &positionsReturn,
) -> RamsesPositionView
pub fn from_nfpm_returns( token_id: Uint<256, 4>, ret: &positionsReturn, ) -> RamsesPositionView
Decode a Ramses-family NFPM positions(uint256) return tuple.
Trait Implementations§
Source§impl Clone for RamsesPositionView
impl Clone for RamsesPositionView
Source§fn clone(&self) -> RamsesPositionView
fn clone(&self) -> RamsesPositionView
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 RamsesPositionView
impl Debug for RamsesPositionView
impl Eq for RamsesPositionView
Source§impl PartialEq for RamsesPositionView
impl PartialEq for RamsesPositionView
Source§fn eq(&self, other: &RamsesPositionView) -> bool
fn eq(&self, other: &RamsesPositionView) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RamsesPositionView
Auto Trait Implementations§
impl Freeze for RamsesPositionView
impl RefUnwindSafe for RamsesPositionView
impl Send for RamsesPositionView
impl Sync for RamsesPositionView
impl Unpin for RamsesPositionView
impl UnsafeUnpin for RamsesPositionView
impl UnwindSafe for RamsesPositionView
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more