[−][src]Struct async_i3ipc::I3
Newtype wrapper for UnixStream that implements i3's IPC
Implementations
impl I3[src]
pub async fn connect() -> Result<Self>[src]
Connects to I3 over UnixStream
pub async fn send_msg_body<P, '_>(
&'_ mut self,
msg: Msg,
payload: P
) -> Result<()> where
P: AsRef<str>, [src]
&'_ mut self,
msg: Msg,
payload: P
) -> Result<()> where
P: AsRef<str>,
pub async fn send_msg<'_>(&'_ mut self, msg: Msg) -> Result<()>[src]
pub async fn read_msg<D, '_>(&'_ mut self) -> Result<MsgResponse<D>> where
D: DeserializeOwned, [src]
D: DeserializeOwned,
Receive some message from the socket. Holds a Msg type and payload
pub async fn read_event<'_>(&'_ mut self) -> Result<Event>[src]
Like read_msg but for event::Event
pub async fn send_read<P, D, '_>(
&'_ mut self,
msg: Msg,
payload: P
) -> Result<MsgResponse<D>> where
P: AsRef<str>,
D: DeserializeOwned, [src]
&'_ mut self,
msg: Msg,
payload: P
) -> Result<MsgResponse<D>> where
P: AsRef<str>,
D: DeserializeOwned,
Send a Msg and payload and receive a response. Convenience function
over send_msg and read_msg
pub async fn subscribe<E, '_>(&'_ mut self, events: E) -> Result<Success> where
E: AsRef<[Subscribe]>, [src]
E: AsRef<[Subscribe]>,
Returns a Future that will send a Subscribe message to i3 along with a list of events to listen to.
pub fn listen(self) -> EventStream[src]
Provides a type that implements Stream so you can await events in a
loop
pub async fn run_command<S: AsRef<str>, '_>(
&'_ mut self,
payload: S
) -> Result<Vec<Success>>[src]
&'_ mut self,
payload: S
) -> Result<Vec<Success>>
Run an arbitrary command on i3. Response is a Vec of success
true/false.
pub async fn get_workspaces<'_>(&'_ mut self) -> Result<Workspaces>[src]
Future for getting the current Workspaces, sends Workspaces
pub async fn get_outputs<'_>(&'_ mut self) -> Result<Outputs>[src]
pub async fn get_tree<'_>(&'_ mut self) -> Result<Node>[src]
pub async fn get_marks<'_>(&'_ mut self) -> Result<Marks>[src]
pub async fn get_bar_ids<'_>(&'_ mut self) -> Result<BarIds>[src]
pub async fn get_bar_config<S: AsRef<str>, '_>(
&'_ mut self,
bar_id: S
) -> Result<BarConfig>[src]
&'_ mut self,
bar_id: S
) -> Result<BarConfig>
pub async fn get_version<'_>(&'_ mut self) -> Result<Version>[src]
Get i3 version
pub async fn get_binding_modes<'_>(&'_ mut self) -> Result<BindingModes>[src]
Future to get BindingModes, sends BindingModes
pub async fn get_config<'_>(&'_ mut self) -> Result<Config>[src]
pub async fn get_tick<'_>(&'_ mut self) -> Result<Success>[src]
Future sends Tick
pub async fn get_sync<'_>(&'_ mut self) -> Result<Success>[src]
Future Sync
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,