#[non_exhaustive]pub struct AllocationOptions {
pub allocation_strategy: AllocationStrategy,
pub first_available_ranges_lookup_size: i32,
/* private fields */
}Expand description
Range auto-allocation options, to be optionally used when CIDR block is not explicitly set.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.allocation_strategy: AllocationStrategyOptional. Allocation strategy Not setting this field when the allocation is requested means an implementation defined strategy is used.
first_available_ranges_lookup_size: i32Optional. This field must be set only when allocation_strategy is set to RANDOM_FIRST_N_AVAILABLE. The value should be the maximum expected parallelism of range creation requests issued to the same space of peered netwroks.
Implementations§
Source§impl AllocationOptions
impl AllocationOptions
pub fn new() -> Self
Sourcepub fn set_allocation_strategy<T: Into<AllocationStrategy>>(self, v: T) -> Self
pub fn set_allocation_strategy<T: Into<AllocationStrategy>>(self, v: T) -> Self
Sets the value of allocation_strategy.
Sourcepub fn set_first_available_ranges_lookup_size<T: Into<i32>>(self, v: T) -> Self
pub fn set_first_available_ranges_lookup_size<T: Into<i32>>(self, v: T) -> Self
Sets the value of first_available_ranges_lookup_size.
Trait Implementations§
Source§impl Clone for AllocationOptions
impl Clone for AllocationOptions
Source§fn clone(&self) -> AllocationOptions
fn clone(&self) -> AllocationOptions
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 AllocationOptions
impl Debug for AllocationOptions
Source§impl Default for AllocationOptions
impl Default for AllocationOptions
Source§fn default() -> AllocationOptions
fn default() -> AllocationOptions
Returns the “default value” for a type. Read more
Source§impl Message for AllocationOptions
impl Message for AllocationOptions
Source§impl PartialEq for AllocationOptions
impl PartialEq for AllocationOptions
impl StructuralPartialEq for AllocationOptions
Auto Trait Implementations§
impl Freeze for AllocationOptions
impl RefUnwindSafe for AllocationOptions
impl Send for AllocationOptions
impl Sync for AllocationOptions
impl Unpin for AllocationOptions
impl UnwindSafe for AllocationOptions
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