pub struct Task {
pub uuid: String,
pub cancellable: bool,
flatpak_task: Optional<FlatpakTask>,
appstream_task: Optional<AppstreamTask>,
}
Fields§
§uuid: String
Each task has a unique UUID that can be used for identification. This is required, for example, if a running task should be cancelled.
cancellable: bool
Whether the task can be cancelled
flatpak_task: Optional<FlatpakTask>
§appstream_task: Optional<AppstreamTask>
Implementations§
source§impl Task
impl Task
pub fn new_flatpak(task: FlatpakTask, cancellable: bool) -> Self
pub fn new_appstream(task: AppstreamTask, cancellable: bool) -> Self
sourcepub fn flatpak_task(&self) -> Option<FlatpakTask>
pub fn flatpak_task(&self) -> Option<FlatpakTask>
Returns FlatpakTask if this is a Flatpak task.
sourcepub fn appstream_task(&self) -> Option<AppstreamTask>
pub fn appstream_task(&self) -> Option<AppstreamTask>
Returns AppstreamTask if this is a Flatpak task
Trait Implementations§
source§impl<'de> Deserialize<'de> for Task
impl<'de> Deserialize<'de> for Task
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl IntoGlibPtr<*mut Task> for Task
impl IntoGlibPtr<*mut Task> for Task
source§unsafe fn into_glib_ptr(self) -> *mut Task
unsafe fn into_glib_ptr(self) -> *mut Task
Transfer: full.
source§impl PartialEq<Task> for Task
impl PartialEq<Task> for Task
source§impl<'a> ToGlibPtr<'a, *const Task> for Task
impl<'a> ToGlibPtr<'a, *const Task> for Task
type Storage = PhantomData<&'a Task>
§fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
Transfer: container. Read more
source§impl<'a> ToGlibPtr<'a, *mut Task> for Task
impl<'a> ToGlibPtr<'a, *mut Task> for Task
type Storage = PhantomData<&'a Task>
§fn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
Transfer: container. Read more
source§impl ToValueOptional for Task
impl ToValueOptional for Task
source§fn to_value_optional(s: Option<&Self>) -> Value
fn to_value_optional(s: Option<&Self>) -> Value
Convert an
Option
to a Value
.impl Eq for Task
impl StructuralEq for Task
impl StructuralPartialEq for Task
impl ValueTypeOptional for Task
Auto Trait Implementations§
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
Blanket Implementations§
§impl<'de, T> DynamicDeserialize<'de> for Twhere
T: Type + Deserialize<'de> + ?Sized,
impl<'de, T> DynamicDeserialize<'de> for Twhere
T: Type + Deserialize<'de> + ?Sized,
§type Deserializer = PhantomData<T>
type Deserializer = PhantomData<T>
A DeserializeSeed implementation for this type.
§impl<T> DynamicType for Twhere
T: Type + ?Sized,
impl<T> DynamicType for Twhere
T: Type + ?Sized,
§fn dynamic_signature(&self) -> Signature<'_>
fn dynamic_signature(&self) -> Signature<'_>
Get the signature for the implementing type. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoClosureReturnValue for Twhere
T: Into<Value>,
impl<T> IntoClosureReturnValue for Twhere
T: Into<Value>,
fn into_closure_return_value(self) -> Option<Value>
§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
§impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for Twhere
T: Send + ToValue + ?Sized,
§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a
SendValue
clone of self
.