Struct x11rb::wrapper::GrabServer
source · pub struct GrabServer<'c, C: XProtoConnectionExt>(/* private fields */);
Expand description
A RAII-like wrapper around super::protocol::xproto::grab_server and super::protocol::xproto::ungrab_server.
Instances of this struct represent that we sent a super::protocol::xproto::grab_server request. When this struct is dropped, an super::protocol::xproto::ungrab_server request is sent.
Any errors during Drop
are silently ignored. Most likely an error here means that your
X11 connection is broken and later requests will also fail.
Implementations§
source§impl<'c, C: XProtoConnectionExt> GrabServer<'c, C>
impl<'c, C: XProtoConnectionExt> GrabServer<'c, C>
sourcepub fn grab(conn: &'c C) -> Result<Self, ConnectionError>
pub fn grab(conn: &'c C) -> Result<Self, ConnectionError>
Grab the server by sending a super::protocol::xproto::grab_server request.
The returned type will call super::protocol::xproto::ungrab_server when it is dropped.
Trait Implementations§
source§impl<'c, C: Debug + XProtoConnectionExt> Debug for GrabServer<'c, C>
impl<'c, C: Debug + XProtoConnectionExt> Debug for GrabServer<'c, C>
source§impl<C: XProtoConnectionExt> Drop for GrabServer<'_, C>
impl<C: XProtoConnectionExt> Drop for GrabServer<'_, C>
Auto Trait Implementations§
impl<'c, C> RefUnwindSafe for GrabServer<'c, C>where
C: RefUnwindSafe,
impl<'c, C> Send for GrabServer<'c, C>where
C: Sync,
impl<'c, C> Sync for GrabServer<'c, C>where
C: Sync,
impl<'c, C> Unpin for GrabServer<'c, C>
impl<'c, C> UnwindSafe for GrabServer<'c, C>where
C: RefUnwindSafe,
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