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>
impl<'p> InstallerProxy<'p>
pub async fn new(conn: &Connection) -> Result<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>
pub fn builder(conn: &Connection) -> Builder<'p, Self>
Returns a customizable builder for this proxy.
pub fn into_inner(self) -> Proxy<'p>
pub fn into_inner(self) -> Proxy<'p>
Consumes self, returning the underlying zbus::Proxy.
pub fn inner(&self) -> &Proxy<'p>
pub fn inner(&self) -> &Proxy<'p>
The reference to the underlying zbus::Proxy.
pub fn inner_mut(&mut self) -> &mut Proxy<'p>
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
pub async fn install(&self, source: &str) -> Result<()>
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<()>
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
pub async fn info(&self, bundle: &str) -> Result<(String, String)>
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>
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)>
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)>>
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>>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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 fn cached_progress(
&self,
) -> Result<Option<<Result<Progress> as ResultAdapter>::Ok>, <Result<Progress> as ResultAdapter>::Err>
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>
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>
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>
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>
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 fn cached_variant(
&self,
) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>
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>
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>
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>
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>
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>
impl<'p> AsMut<Proxy<'p>> for InstallerProxy<'p>
§impl<'p> AsRef<Proxy<'p>> for InstallerProxy<'p>
impl<'p> AsRef<Proxy<'p>> for InstallerProxy<'p>
§impl<'p> Clone for InstallerProxy<'p>
impl<'p> Clone for InstallerProxy<'p>
§fn clone(&self) -> InstallerProxy<'p>
fn clone(&self) -> InstallerProxy<'p>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more