pub struct DispatchQos {
pub qos_class: DispatchQosClass,
pub relative_priority: i32,
}Expand description
The quality of service, or the execution priority, to apply to tasks.
This is semantically equivalent to Swift’s
DispatchQoS.
Fields§
§qos_class: DispatchQosClassThe quality-of-service class.
relative_priority: i32The priority of a quality of service relative to others with the same class.
Implementations§
Source§impl DispatchQos
impl DispatchQos
Sourcepub const INTERACTIVE: Self
pub const INTERACTIVE: Self
The quality-of-service class for user-interactive tasks, such as animations, event handling, or updating your app’s user interface.
Sourcepub const USER_INITIATED: Self
pub const USER_INITIATED: Self
The quality-of-service class for tasks that prevent the user from actively using your app.
Sourcepub const UTILITY: Self
pub const UTILITY: Self
The quality-of-service class for tasks that the user does not track actively.
Sourcepub const BACKGROUND: Self
pub const BACKGROUND: Self
The quality-of-service class for maintenance or cleanup tasks that you create.
Sourcepub const UNSPECIFIED: Self
pub const UNSPECIFIED: Self
The absence of a quality-of-service class.
Sourcepub const fn new(qos_class: DispatchQosClass, relative_priority: i32) -> Self
pub const fn new(qos_class: DispatchQosClass, relative_priority: i32) -> Self
Creates a new instance with the specified QoS class and relative priority.
Sourcepub const fn with_qos_class(self, qos_class: DispatchQosClass) -> Self
pub const fn with_qos_class(self, qos_class: DispatchQosClass) -> Self
Reassigns the value of qos_class.
Sourcepub const fn with_relative_priority(self, relative_priority: i32) -> Self
pub const fn with_relative_priority(self, relative_priority: i32) -> Self
Reassigns the value of
relative_priority.
Trait Implementations§
Source§impl Clone for DispatchQos
impl Clone for DispatchQos
Source§fn clone(&self) -> DispatchQos
fn clone(&self) -> DispatchQos
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more