pub struct Ibus;Expand description
The transport properties of an IBus D-Bus address.
This transport type queries the IBus daemon for its D-Bus address using the ibus address
command. IBus (Intelligent Input Bus) is an input method framework used primarily on Linux
systems for entering text in various languages.
§Platform Support
This transport is available on Unix-like systems where IBus is installed.
§Example
// Create an IBus transport
let ibus = Ibus::new();
let _addr = Transport::Ibus(ibus);
// Or use it directly as an address
let _addr = Address::from(Transport::Ibus(Ibus::new()));Implementations§
Source§impl Ibus
impl Ibus
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new IBus transport.
This will query the IBus daemon for its D-Bus address when the connection is established.
Sourcepub(super) async fn bus_address(&self) -> Result<Address>
pub(super) async fn bus_address(&self) -> Result<Address>
Determine the actual transport details behind an IBus address.
This method executes the ibus address command to retrieve the D-Bus address from the
running IBus daemon, then parses and returns the underlying transport.
§Errors
Returns an error if:
- The
ibuscommand is not found or fails to execute - The IBus daemon is not running
- The command output cannot be parsed as a valid D-Bus address
- The command output is not valid UTF-8
§Example
// This method is used internally by the connection builder
let _conn = Builder::ibus()?.build().await?;Sourcepub(super) fn from_options(_opts: HashMap<&str, &str>) -> Result<Self>
pub(super) fn from_options(_opts: HashMap<&str, &str>) -> Result<Self>
Parse IBus transport from D-Bus address options.
The IBus transport type does not require any options, so this method will succeed as long as the transport type is specified as “ibus”.
§Errors
This method does not return errors for the IBus transport, but the signature is kept consistent with other transport types.