Struct softbuffer::Context
source · pub struct Context { /* private fields */ }Expand description
An instance of this struct contains the platform-specific data that must be managed in order to write to a window on that platform.
Implementations§
source§impl Context
impl Context
sourcepub unsafe fn new<D: HasRawDisplayHandle>(
display: &D
) -> Result<Self, SoftBufferError>
pub unsafe fn new<D: HasRawDisplayHandle>( display: &D ) -> Result<Self, SoftBufferError>
Creates a new instance of this struct, using the provided display.
Safety
- Ensure that the provided object is valid for the lifetime of the Context
sourcepub unsafe fn from_raw(
raw_display_handle: RawDisplayHandle
) -> Result<Self, SoftBufferError>
pub unsafe fn from_raw( raw_display_handle: RawDisplayHandle ) -> Result<Self, SoftBufferError>
Creates a new instance of this struct, using the provided display handles
Safety
- Ensure that the provided handle is valid for the lifetime of the Context
Auto Trait Implementations§
impl RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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