#[non_exhaustive]pub struct InstanceSplit {
pub type: InstanceSplitAllocationType,
pub revision: String,
pub percent: i32,
/* private fields */
}Expand description
Holds a single instance split entry for the Worker. Allocations can be done to a specific Revision name, or pointing to the latest Ready Revision.
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.type: InstanceSplitAllocationTypeThe allocation type for this instance split.
revision: StringRevision to which to assign this portion of instances, if split allocation is by revision.
percent: i32Specifies percent of the instance split to this Revision. This defaults to zero if unspecified.
Implementations§
Source§impl InstanceSplit
impl InstanceSplit
pub fn new() -> Self
Sourcepub fn set_type<T: Into<InstanceSplitAllocationType>>(self, v: T) -> Self
pub fn set_type<T: Into<InstanceSplitAllocationType>>(self, v: T) -> Self
Sourcepub fn set_revision<T: Into<String>>(self, v: T) -> Self
pub fn set_revision<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for InstanceSplit
impl Clone for InstanceSplit
Source§fn clone(&self) -> InstanceSplit
fn clone(&self) -> InstanceSplit
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 InstanceSplit
impl Debug for InstanceSplit
Source§impl Default for InstanceSplit
impl Default for InstanceSplit
Source§fn default() -> InstanceSplit
fn default() -> InstanceSplit
Returns the “default value” for a type. Read more
Source§impl Message for InstanceSplit
impl Message for InstanceSplit
Source§impl PartialEq for InstanceSplit
impl PartialEq for InstanceSplit
impl StructuralPartialEq for InstanceSplit
Auto Trait Implementations§
impl Freeze for InstanceSplit
impl RefUnwindSafe for InstanceSplit
impl Send for InstanceSplit
impl Sync for InstanceSplit
impl Unpin for InstanceSplit
impl UnwindSafe for InstanceSplit
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