pub struct VsockSpecPatch {
pub routes: Option<Vec<VsockRouteSpec>>,
}Expand description
A sparse, presence-aware patch for VsockSpec.
Fields§
§routes: Option<Vec<VsockRouteSpec>>Pending update for routes. Omitted values leave the target unchanged.
Implementations§
Source§impl VsockSpecPatch
impl VsockSpecPatch
Sourcepub fn routes(self, value: Vec<VsockRouteSpec>) -> Self
pub fn routes(self, value: Vec<VsockRouteSpec>) -> Self
Set the routes field in this patch.
Sourcepub fn routes_mut(&mut self, value: Vec<VsockRouteSpec>) -> &mut Self
pub fn routes_mut(&mut self, value: Vec<VsockRouteSpec>) -> &mut Self
Set the routes field in this patch.
Mutates this patch in place and returns it for chaining.
Sourcepub fn clear_routes(self) -> Self
pub fn clear_routes(self) -> Self
Remove routes from this patch so applying it leaves the target unchanged.
Sourcepub fn clear_routes_mut(&mut self) -> &mut Self
pub fn clear_routes_mut(&mut self) -> &mut Self
Remove routes from this patch so applying it leaves the target unchanged.
Mutates this patch in place and returns it for chaining.
Sourcepub fn overlay(self, higher: Self) -> Self
pub fn overlay(self, higher: Self) -> Self
Overlay a higher-precedence patch using each field’s declared strategy.
Sourcepub fn overlay_mut(&mut self, higher: Self) -> &mut Self
pub fn overlay_mut(&mut self, higher: Self) -> &mut Self
Overlay a higher-precedence patch using each field’s declared strategy. Mutates this patch in place and returns it for chaining.
Sourcepub fn into_config(self) -> VsockSpec
pub fn into_config(self) -> VsockSpec
Apply this patch to the configuration’s defaults.
Compose all overlays first. This conversion does not validate the result.
Sourcepub fn from_present_fields(value: VsockSpec) -> Self
pub fn from_present_fields(value: VsockSpec) -> Self
Convert non-null fields into a changeset, treating Option::None as absent.