Trait libflatpak::prelude::InstanceExt

source ·
pub trait InstanceExt:
    IsA<Instance>
    + Sealed
    + 'static {
    // Provided methods
    fn app(&self) -> Option<GString> { ... }
    fn arch(&self) -> Option<GString> { ... }
    fn branch(&self) -> Option<GString> { ... }
    fn child_pid(&self) -> i32 { ... }
    fn commit(&self) -> Option<GString> { ... }
    fn id(&self) -> Option<GString> { ... }
    fn info(&self) -> Option<KeyFile> { ... }
    fn pid(&self) -> i32 { ... }
    fn runtime(&self) -> Option<GString> { ... }
    fn runtime_commit(&self) -> Option<GString> { ... }
    fn is_running(&self) -> bool { ... }
}
Expand description

Trait containing all Instance methods.

§Implementors

Instance

Provided Methods§

source

fn app(&self) -> Option<GString>

Gets the application ID of the application running in the instance.

Note that this may return None for sandboxes that don’t have an application.

§Returns

the application ID or None

source

fn arch(&self) -> Option<GString>

Gets the architecture of the application running in the instance.

§Returns

the architecture

source

fn branch(&self) -> Option<GString>

Gets the branch of the application running in the instance.

§Returns

the architecture

source

fn child_pid(&self) -> i32

Gets the PID of the application process in the sandbox.

See pid().

Note that this function may return 0 immediately after launching a sandbox, for a short amount of time.

§Returns

the application process PID

source

fn commit(&self) -> Option<GString>

Gets the commit of the application running in the instance.

§Returns

the commit

source

fn id(&self) -> Option<GString>

Gets the instance ID. The ID is used by Flatpak for bookkeeping purposes and has no further relevance.

§Returns

the instance ID

source

fn info(&self) -> Option<KeyFile>

Gets a keyfile that holds information about the running sandbox.

This file is available as /.flatpak-info inside the sandbox as well.

The most important data in the keyfile is available with separate getters, but there may be more information in the keyfile.

§Returns

the flatpak-info keyfile

source

fn pid(&self) -> i32

Gets the PID of the outermost process in the sandbox. This is not the application process itself, but a bubblewrap ‘babysitter’ process.

See child_pid().

§Returns

the outermost process PID

source

fn runtime(&self) -> Option<GString>

Gets the ref of the runtime used in the instance.

§Returns

the runtime ref

source

fn runtime_commit(&self) -> Option<GString>

Gets the commit of the runtime used in the instance.

§Returns

the runtime commit

source

fn is_running(&self) -> bool

Finds out if the sandbox represented by self is still running.

§Returns

true if the sandbox is still running

Object Safety§

This trait is not object safe.

Implementors§