Struct as_raw_xcb_connection::ValidConnection
source · pub struct ValidConnection(/* private fields */);
Expand description
An assertion that this pointer is valid for as long as the underlying connection.
This type provides an escape hatch for users who want to use a raw pointer to xcb_connection_t
but still want to use the safety guarantees of this crate. By constructing an instance of this
type, users can assert that the pointer is valid for as long as the underlying connection.
Implementations§
source§impl ValidConnection
impl ValidConnection
sourcepub unsafe fn new(ptr: *mut xcb_connection_t) -> Self
pub unsafe fn new(ptr: *mut xcb_connection_t) -> Self
Create a new ValidConnection
from a raw pointer.
Safety
The pointer must be valid for as long as the underlying connection.
Trait Implementations§
source§impl AsRawXcbConnection for ValidConnection
impl AsRawXcbConnection for ValidConnection
source§fn as_raw_xcb_connection(&self) -> *mut xcb_connection_t
fn as_raw_xcb_connection(&self) -> *mut xcb_connection_t
Get a raw xcb connection pointer from this object.
Auto Trait Implementations§
impl RefUnwindSafe for ValidConnection
impl !Send for ValidConnection
impl !Sync for ValidConnection
impl Unpin for ValidConnection
impl UnwindSafe for ValidConnection
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