Skip to main content

InstallerProxy

Struct InstallerProxy 

pub struct InstallerProxy<'p>(Proxy<'p>);
Expand description

Client for the de.pengutronix.rauc.Installer interface of RAUC.

The interface installs bundles, reads the slot status and marks slots. RAUC exports it at the object path /.

InstallBundle returns when RAUC has accepted the job. The result comes later in the Completed signal. Subscribe with receive_completed before you call install_bundle, or a fast failure can be missed.

RAUC sends PropertiesChanged for every property. The proxy caches them. Watch Operation and Progress to follow an installation.

While an installation runs, RAUC rejects GetSlotStatus, GetArtifactStatus, InspectBundle, Mark and GetPrimary with a D-Bus error.

Upstream documentation: https://rauc.readthedocs.io/en/latest/reference.html#d-bus-api.

Tuple Fields§

§0: Proxy<'p>

Implementations§

§

impl<'p> InstallerProxy<'p>

pub async fn new(conn: &Connection) -> Result<InstallerProxy<'p>>

Creates a new proxy with the default service and path.

pub fn builder(conn: &Connection) -> Builder<'p, Self>

Returns a customizable builder for this proxy.

pub fn into_inner(self) -> Proxy<'p>

Consumes self, returning the underlying zbus::Proxy.

pub fn inner(&self) -> &Proxy<'p>

The reference to the underlying zbus::Proxy.

pub fn inner_mut(&mut self) -> &mut Proxy<'p>

The mutable reference to the underlying zbus::Proxy.

pub async fn install(&self, source: &str) -> Result<()>

👎Deprecated:

deprecated upstream since RAUC 1.3, use install_bundle

Starts the installation of a bundle from a local path.

Deprecated upstream since RAUC 1.3.

pub async fn install_bundle( &self, source: &str, args: &InstallArgs, ) -> Result<()>

Starts the installation of a bundle.

The call returns at once. The Completed signal reports the result. The source is a path or a URL.

Added in RAUC 1.3.

pub async fn info(&self, bundle: &str) -> Result<(String, String)>

👎Deprecated:

deprecated upstream since RAUC 1.9, use inspect_bundle

Returns the compatible string and the version of a bundle.

The call returns (compatible, version).

Deprecated upstream since RAUC 1.9.

pub async fn inspect_bundle( &self, source: &str, args: &InspectArgs, ) -> Result<BundleInfo>

Returns the manifest information of a bundle.

The source is a path or a URL.

Added in RAUC 1.9.

pub async fn mark( &self, state: &MarkState, slot_identifier: &SlotIdentifier, ) -> Result<(String, String)>

Sets the state of a slot.

The call returns (slot_name, message). The slot name is the slot that RAUC marked. The message says what RAUC did.

pub async fn get_slot_status(&self) -> Result<Vec<(String, SlotStatus)>>

Returns the status of all slots as pairs of slot name and status.

pub async fn get_artifact_status(&self) -> Result<Vec<ArtifactRepository>>

Returns the artifact repositories and their artifacts.

Added in RAUC 1.13.

pub async fn get_primary(&self) -> Result<String>

Asks the bootloader for the primary slot and returns its name.

pub async fn receive_completed(&self) -> Result<CompletedStream>

Create a stream that receives Completed signals.

This a convenient wrapper around zbus::Proxy::receive_signal. Reports that an installation ended.

The result is 0 on success.

pub async fn receive_completed_with_args( &self, args: &[(u8, &str)], ) -> Result<CompletedStream>

Create a stream that receives Completed signals.

This a convenient wrapper around zbus::Proxy::receive_signal_with_args. Reports that an installation ended.

The result is 0 on success.

pub async fn operation(&self) -> Result<Operation>

What RAUC is doing now, either idle or installing.

pub fn cached_operation( &self, ) -> Result<Option<<Result<Operation> as ResultAdapter>::Ok>, <Result<Operation> as ResultAdapter>::Err>

What RAUC is doing now, either idle or installing. Get the cached value of the Operation property, or None if the property is not cached.

pub async fn receive_operation_changed( &self, ) -> PropertyStream<'p, <Result<Operation> as ResultAdapter>::Ok>

What RAUC is doing now, either idle or installing. Create a stream for the Operation property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].

pub async fn last_error(&self) -> Result<String>

The message of the last error.

pub fn cached_last_error( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

The message of the last error. Get the cached value of the LastError property, or None if the property is not cached.

pub async fn receive_last_error_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

The message of the last error. Create a stream for the LastError property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].

pub async fn progress(&self) -> Result<Progress>

The installation progress.

pub fn cached_progress( &self, ) -> Result<Option<<Result<Progress> as ResultAdapter>::Ok>, <Result<Progress> as ResultAdapter>::Err>

The installation progress. Get the cached value of the Progress property, or None if the property is not cached.

pub async fn receive_progress_changed( &self, ) -> PropertyStream<'p, <Result<Progress> as ResultAdapter>::Ok>

The installation progress. Create a stream for the Progress property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].

pub async fn compatible(&self) -> Result<String>

The compatible string of the system.

pub fn cached_compatible( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

The compatible string of the system. Get the cached value of the Compatible property, or None if the property is not cached.

pub async fn receive_compatible_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

The compatible string of the system. Create a stream for the Compatible property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].

pub async fn variant(&self) -> Result<String>

The variant of the system, or an empty string.

pub fn cached_variant( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

The variant of the system, or an empty string. Get the cached value of the Variant property, or None if the property is not cached.

pub async fn receive_variant_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

The variant of the system, or an empty string. Create a stream for the Variant property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].

pub async fn boot_slot(&self) -> Result<String>

The slot that the system booted from.

The value is a slot name such as rootfs.0. It is a device path such as /dev/mmcblk0p1 when the kernel command line has root= and RAUC cannot map it to a slot.

pub fn cached_boot_slot( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

The slot that the system booted from.

The value is a slot name such as rootfs.0. It is a device path such as /dev/mmcblk0p1 when the kernel command line has root= and RAUC cannot map it to a slot. Get the cached value of the BootSlot property, or None if the property is not cached.

pub async fn receive_boot_slot_changed( &self, ) -> PropertyStream<'p, <Result<String> as ResultAdapter>::Ok>

The slot that the system booted from.

The value is a slot name such as rootfs.0. It is a device path such as /dev/mmcblk0p1 when the kernel command line has root= and RAUC cannot map it to a slot. Create a stream for the BootSlot property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].

Trait Implementations§

§

impl<'p> AsMut<Proxy<'p>> for InstallerProxy<'p>

§

fn as_mut(&mut self) -> &mut Proxy<'p>

Converts this type into a mutable reference of the (usually inferred) input type.
§

impl<'p> AsRef<Proxy<'p>> for InstallerProxy<'p>

§

fn as_ref(&self) -> &Proxy<'p>

Converts this type into a shared reference of the (usually inferred) input type.
§

impl<'p> Clone for InstallerProxy<'p>

§

fn clone(&self) -> InstallerProxy<'p>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<'p> Debug for InstallerProxy<'p>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl<'a> Defaults for InstallerProxy<'a>

§

const INTERFACE: &'static Option<InterfaceName<'static>>

§

const DESTINATION: &'static Option<BusName<'static>>

§

const PATH: &'static Option<ObjectPath<'static>>

§

impl<'p> From<Proxy<'p>> for InstallerProxy<'p>

§

fn from(proxy: Proxy<'p>) -> Self

Converts to this type from the input type.
§

impl<'p> ProxyImpl<'p> for InstallerProxy<'p>

§

fn builder(conn: &Connection) -> Builder<'p, Self>

Return a customizable builder for this proxy.
§

fn into_inner(self) -> Proxy<'p>

Consume self, returning the underlying zbus::Proxy.
§

fn inner(&self) -> &Proxy<'p>

The reference to the underlying zbus::Proxy.
§

impl<'p> Serialize for InstallerProxy<'p>

§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl<'p> Type for InstallerProxy<'p>

§

const SIGNATURE: &'static Signature

The signature for the implementing type, in parsed format. Read more

Auto Trait Implementations§

§

impl<'p> !RefUnwindSafe for InstallerProxy<'p>

§

impl<'p> !UnwindSafe for InstallerProxy<'p>

§

impl<'p> Freeze for InstallerProxy<'p>

§

impl<'p> Send for InstallerProxy<'p>

§

impl<'p> Sync for InstallerProxy<'p>

§

impl<'p> Unpin for InstallerProxy<'p>

§

impl<'p> UnsafeUnpin for InstallerProxy<'p>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> DynamicType for T
where T: Type + ?Sized,

§

fn signature(&self) -> Signature

The type signature for self. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more