pub struct LayerDistribution {
pub layer1: u64,
pub layer2: u64,
pub layer3: u64,
}
Fields§
§layer1: u64
§layer2: u64
§layer3: u64
Implementations§
source§impl LayerDistribution
impl LayerDistribution
pub fn choose_with_fewest(&self) -> Layer
pub fn increment_layer_count(&mut self, layer: Layer)
pub fn decrement_layer_count( &mut self, layer: Layer ) -> Result<(), MixnetContractError>
Trait Implementations§
source§impl Clone for LayerDistribution
impl Clone for LayerDistribution
source§fn clone(&self) -> LayerDistribution
fn clone(&self) -> LayerDistribution
Returns a copy 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 LayerDistribution
impl Debug for LayerDistribution
source§impl Default for LayerDistribution
impl Default for LayerDistribution
source§fn default() -> LayerDistribution
fn default() -> LayerDistribution
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for LayerDistribution
impl<'de> Deserialize<'de> for LayerDistribution
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 Index<Layer> for LayerDistribution
impl Index<Layer> for LayerDistribution
source§impl PartialEq<LayerDistribution> for LayerDistribution
impl PartialEq<LayerDistribution> for LayerDistribution
source§fn eq(&self, other: &LayerDistribution) -> bool
fn eq(&self, other: &LayerDistribution) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for LayerDistribution
impl Serialize for LayerDistribution
impl Copy for LayerDistribution
impl Eq for LayerDistribution
impl StructuralEq for LayerDistribution
impl StructuralPartialEq for LayerDistribution
Auto Trait Implementations§
impl RefUnwindSafe for LayerDistribution
impl Send for LayerDistribution
impl Sync for LayerDistribution
impl Unpin for LayerDistribution
impl UnwindSafe for LayerDistribution
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