pub struct FenceWrapper<C: RequestConnection>(/* private fields */);Expand description
A RAII-like wrapper around a Fence.
Instances of this struct represent a Fence that is freed in Drop.
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: RequestConnection> FenceWrapper<C>
impl<C: RequestConnection> FenceWrapper<C>
Source§impl<'c, C: X11Connection> FenceWrapper<&'c C>
impl<'c, C: X11Connection> FenceWrapper<&'c C>
Create a new Fence and return a Fence wrapper and a cookie.
This is a thin wrapper around create_fence that allocates an id for the Fence.
This function returns the resulting FenceWrapper that owns the created Fence and frees
it in Drop. This also returns a VoidCookie that comes from the call to
create_fence.
Errors can come from the call to X11Connection::generate_id or create_fence.
Source§impl<C: X11Connection> FenceWrapper<C>
impl<C: X11Connection> FenceWrapper<C>
Sourcepub fn create_fence(
conn: C,
drawable: Drawable,
initially_triggered: bool,
) -> Result<Self, ReplyOrIdError>
pub fn create_fence( conn: C, drawable: Drawable, initially_triggered: bool, ) -> Result<Self, ReplyOrIdError>
Create a new Fence and return a Fence wrapper
This is a thin wrapper around create_fence that allocates an id for the Fence.
This function returns the resulting FenceWrapper that owns the created Fence and frees
it in Drop.
Errors can come from the call to X11Connection::generate_id or create_fence.