pub struct WeightedState {
pub base: BasePoolState,
pub weights: Vec<U256>,
}Expand description
Weighted pool state (extends BasePoolState with weighted-specific fields)
Fields§
§base: BasePoolStateBase pool state
weights: Vec<U256>Normalized weights (scaled 18)
Implementations§
Source§impl WeightedState
impl WeightedState
Trait Implementations§
Source§impl AsRef<BasePoolState> for WeightedState
impl AsRef<BasePoolState> for WeightedState
Source§fn as_ref(&self) -> &BasePoolState
fn as_ref(&self) -> &BasePoolState
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for WeightedState
impl Clone for WeightedState
Source§fn clone(&self) -> WeightedState
fn clone(&self) -> WeightedState
Returns a duplicate of the value. Read more
1.0.0 · 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 WeightedState
impl Debug for WeightedState
Source§impl<'de> Deserialize<'de> for WeightedState
impl<'de> Deserialize<'de> for WeightedState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<WeightedState> for BasePoolState
impl From<WeightedState> for BasePoolState
Source§fn from(weighted_state: WeightedState) -> Self
fn from(weighted_state: WeightedState) -> Self
Converts to this type from the input type.
Source§impl From<WeightedState> for PoolState
impl From<WeightedState> for PoolState
Source§fn from(state: WeightedState) -> Self
fn from(state: WeightedState) -> Self
Converts to this type from the input type.
Source§impl From<WeightedState> for WeightedPool
impl From<WeightedState> for WeightedPool
Source§fn from(weighted_state: WeightedState) -> Self
fn from(weighted_state: WeightedState) -> Self
Converts to this type from the input type.
Source§impl PartialEq for WeightedState
impl PartialEq for WeightedState
Source§impl Serialize for WeightedState
impl Serialize for WeightedState
impl StructuralPartialEq for WeightedState
Auto Trait Implementations§
impl Freeze for WeightedState
impl RefUnwindSafe for WeightedState
impl Send for WeightedState
impl Sync for WeightedState
impl Unpin for WeightedState
impl UnwindSafe for WeightedState
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