Ibus

Struct Ibus 

Source
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

Source

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.

Source

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 ibus command 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?;
Source

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.

Trait Implementations§

Source§

impl Clone for Ibus

Source§

fn clone(&self) -> Ibus

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Ibus

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for Ibus

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for Ibus

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Ibus

Source§

fn eq(&self, other: &Ibus) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Ibus

Source§

impl StructuralPartialEq for Ibus

Auto Trait Implementations§

§

impl Freeze for Ibus

§

impl RefUnwindSafe for Ibus

§

impl Send for Ibus

§

impl Sync for Ibus

§

impl Unpin for Ibus

§

impl UnwindSafe for Ibus

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> NoneValue for T
where T: Default,

Source§

type NoneType = T

Source§

fn null_value() -> T

The none-equivalent value.
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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