pub struct VirtualNodeConfig { /* private fields */ }Expand description
Configuration for storage virtual nodes.
Implementations§
Source§impl VirtualNodeConfig
impl VirtualNodeConfig
Sourcepub const fn new(network_id: u32, positions_per_owner: u16) -> Self
pub const fn new(network_id: u32, positions_per_owner: u16) -> Self
Build a virtual-node configuration.
Post: positions_per_owner <= MAX_STORAGE_VIRTUAL_POSITIONS_PER_OWNER.
Sourcepub const fn is_enabled(self) -> bool
pub const fn is_enabled(self) -> bool
Returns whether this configuration enables virtual storage ownership.
Sourcepub const fn network_id(self) -> u32
pub const fn network_id(self) -> u32
Return the network namespace mixed into derived virtual positions.
Sourcepub const fn positions_per_owner(self) -> u16
pub const fn positions_per_owner(self) -> u16
Return the bounded number of positions derived for each physical owner.
Sourcepub const fn positions_per_owner_within_limit(positions_per_owner: u16) -> bool
pub const fn positions_per_owner_within_limit(positions_per_owner: u16) -> bool
Returns whether positions_per_owner is inside the configured cost bound.
Trait Implementations§
Source§impl Clone for VirtualNodeConfig
impl Clone for VirtualNodeConfig
impl Copy for VirtualNodeConfig
Source§impl Debug for VirtualNodeConfig
impl Debug for VirtualNodeConfig
impl Eq for VirtualNodeConfig
Source§impl PartialEq for VirtualNodeConfig
impl PartialEq for VirtualNodeConfig
impl StructuralPartialEq for VirtualNodeConfig
Auto Trait Implementations§
impl Forget for VirtualNodeConfig
impl Freeze for VirtualNodeConfig
impl Move for VirtualNodeConfig
impl RefUnwindSafe for VirtualNodeConfig
impl Send for VirtualNodeConfig
impl Sync for VirtualNodeConfig
impl Unpin for VirtualNodeConfig
impl UnsafeUnpin for VirtualNodeConfig
impl UnwindSafe for VirtualNodeConfig
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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