pub struct PackagePolicyEdit { /* private fields */ }Expand description
Changes to a retrieved package policy, created by PackagePolicy::edit
and sent with Fleet::update_package_policy in the full format.
A policy changed since it was read fails with HTTP 409; read it again and
reapply the change. Debug output omits inputs and variables.
Implementations§
Source§impl PackagePolicyEdit
impl PackagePolicyEdit
pub fn name(self, name: impl Into<String>) -> Self
pub fn namespace(self, namespace: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
pub fn enabled(self, enabled: bool) -> Self
Sourcepub fn policy_ids<I: IntoIterator<Item = S>, S: Into<String>>(
self,
ids: I,
) -> Self
pub fn policy_ids<I: IntoIterator<Item = S>, S: Into<String>>( self, ids: I, ) -> Self
Replaces the agent policies the package policy is assigned to.
Sourcepub fn inputs(self, inputs: Value) -> Self
pub fn inputs(self, inputs: Value) -> Self
Replaces the inputs with a full-format array, typically a modified copy
of PackagePolicy::inputs.
Trait Implementations§
Source§impl Clone for PackagePolicyEdit
impl Clone for PackagePolicyEdit
Source§impl Debug for PackagePolicyEdit
impl Debug for PackagePolicyEdit
Source§impl<'p> From<&'p PackagePolicyEdit> for PackagePolicyUpdate<'p>
impl<'p> From<&'p PackagePolicyEdit> for PackagePolicyUpdate<'p>
Source§fn from(edit: &'p PackagePolicyEdit) -> Self
fn from(edit: &'p PackagePolicyEdit) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PackagePolicyEdit
impl RefUnwindSafe for PackagePolicyEdit
impl Send for PackagePolicyEdit
impl Sync for PackagePolicyEdit
impl Unpin for PackagePolicyEdit
impl UnsafeUnpin for PackagePolicyEdit
impl UnwindSafe for PackagePolicyEdit
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