pub struct StubPolicy<P: Plan> { /* private fields */ }
Expand description
A stub policy implementation that allows everything immediately.
Trait Implementations§
Source§impl<P: Plan> Policy for StubPolicy<P>
impl<P: Plan> Policy for StubPolicy<P>
type ComputeNextUpdateTimePolicyData = PolicyData
type UpdateCheckAllowedPolicyData = ()
type UpdateCanStartPolicyData = ()
type RebootPolicyData = ()
type InstallPlan = P
Source§fn compute_next_update_time(
policy_data: &Self::ComputeNextUpdateTimePolicyData,
_apps: &[App],
_scheduling: &UpdateCheckSchedule,
_protocol_state: &ProtocolState,
) -> CheckTiming
fn compute_next_update_time( policy_data: &Self::ComputeNextUpdateTimePolicyData, _apps: &[App], _scheduling: &UpdateCheckSchedule, _protocol_state: &ProtocolState, ) -> CheckTiming
When should the next update happen?
Source§fn update_check_allowed(
_policy_data: &Self::UpdateCheckAllowedPolicyData,
_apps: &[App],
_scheduling: &UpdateCheckSchedule,
_protocol_state: &ProtocolState,
check_options: &CheckOptions,
) -> CheckDecision
fn update_check_allowed( _policy_data: &Self::UpdateCheckAllowedPolicyData, _apps: &[App], _scheduling: &UpdateCheckSchedule, _protocol_state: &ProtocolState, check_options: &CheckOptions, ) -> CheckDecision
Given the current State, and the current PolicyData, is an update check
allowed at this time. A CheckDecision is used to return the reasoning, as in
some cases, instead of an update check, the SM will instead notify Omaha that
it would perform an update, but instead just tell the device whether or not
an update is available.
Source§fn update_can_start(
_policy_data: &Self::UpdateCanStartPolicyData,
_proposed_install_plan: &Self::InstallPlan,
) -> UpdateDecision
fn update_can_start( _policy_data: &Self::UpdateCanStartPolicyData, _proposed_install_plan: &Self::InstallPlan, ) -> UpdateDecision
Given the current State, the current PolicyData, can the proposed InstallPlan
be executed at this time.
Source§fn reboot_allowed(
_policy_data: &Self::RebootPolicyData,
_check_options: &CheckOptions,
) -> bool
fn reboot_allowed( _policy_data: &Self::RebootPolicyData, _check_options: &CheckOptions, ) -> bool
Given the current PolicyData, is reboot allowed right now.
Source§fn reboot_needed(_install_plan: &Self::InstallPlan) -> bool
fn reboot_needed(_install_plan: &Self::InstallPlan) -> bool
Given the InstallPlan, is reboot needed after update has been installed.
Auto Trait Implementations§
impl<P> Freeze for StubPolicy<P>
impl<P> RefUnwindSafe for StubPolicy<P>where
P: RefUnwindSafe,
impl<P> Send for StubPolicy<P>where
P: Send,
impl<P> Sync for StubPolicy<P>
impl<P> Unpin for StubPolicy<P>where
P: Unpin,
impl<P> UnwindSafe for StubPolicy<P>where
P: UnwindSafe,
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