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.
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 super::dri3::fence_from_fd 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
super::dri3::fence_from_fd.
Errors can come from the call to X11Connection::generate_id or super::dri3::fence_from_fd.
Source§impl<C: X11Connection> FenceWrapper<C>
impl<C: X11Connection> FenceWrapper<C>
Sourcepub fn dri3_fence_from_fd<A>(
conn: C,
drawable: Drawable,
initially_triggered: bool,
fence_fd: A,
) -> Result<Self, ReplyOrIdError>where
A: Into<RawFdContainer>,
pub fn dri3_fence_from_fd<A>(
conn: C,
drawable: Drawable,
initially_triggered: bool,
fence_fd: A,
) -> Result<Self, ReplyOrIdError>where
A: Into<RawFdContainer>,
Create a new Fence and return a Fence wrapper
This is a thin wrapper around super::dri3::fence_from_fd 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 super::dri3::fence_from_fd.