Struct Dispatch
pub struct Dispatch;
Expand description
The struct that provides all dispatching methods
Implementations§
§impl Dispatch
impl Dispatch
pub fn call(dispatch_type: DispatchType<'_>) -> Result<(), HyprError>
pub fn call(dispatch_type: DispatchType<'_>) -> Result<(), HyprError>
This function calls a specified dispatcher (blocking)
use hyprland::dispatch::{DispatchType,Dispatch};
// This is an example of just one dispatcher, there are many more!
Dispatch::call(DispatchType::Exec("kitty"))
pub async fn call_async(
dispatch_type: DispatchType<'_>,
) -> Result<(), HyprError>
pub async fn call_async( dispatch_type: DispatchType<'_>, ) -> Result<(), HyprError>
This function calls a specified dispatcher (async)
use hyprland::dispatch::{DispatchType,Dispatch};
// This is an example of just one dispatcher, there are many more!
Dispatch::call_async(DispatchType::Exec("kitty")).await?;
Auto Trait Implementations§
impl Freeze for Dispatch
impl RefUnwindSafe for Dispatch
impl Send for Dispatch
impl Sync for Dispatch
impl Unpin for Dispatch
impl UnwindSafe for Dispatch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more