pub struct Instance { /* private fields */ }Expand description
This is the sync version of the Hyprland Instance. It holds the event streams connected to the sockets of one running Hyprland instance.
Implementations§
Source§impl Instance
impl Instance
Sourcepub fn from_current_env() -> Result<Self>
pub fn from_current_env() -> Result<Self>
uses the $HYPRLAND_INSTANCE_SIGNATURE env variable
Sourcepub fn from_instance(name: String) -> Result<Self>
pub fn from_instance(name: String) -> Result<Self>
Uses the name to determine the sockets to use
Example name: 9958d297641b5c84dcff93f9039d80a5ad37ab00_1752788564_214680212
Sourcepub fn from_base_socket_path(path: PathBuf) -> Result<Self>
pub fn from_base_socket_path(path: PathBuf) -> Result<Self>
Uses the path to determine the sockets to use
Example path: /run/user/1000/hypr/9958d297641b5c84dcff93f9039d80a5ad37ab00_1752788564_21468021
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Instance
impl RefUnwindSafe for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl UnsafeUnpin for Instance
impl UnwindSafe for Instance
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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