pub struct State { /* private fields */ }Expand description
One process’s graphics identity table and the resources behind it.
Dropping it deletes the remaining objects under the graphics lock. If the lock is busy, the next graphics session deletes them.
Implementations§
Source§impl State
impl State
pub fn new(manager: Option<&'static Manager>) -> Self
Sourcepub fn with_file_system(
manager: Option<&'static Manager>,
vfs: &'static VirtualFileSystem,
task: TaskIdentifier,
) -> Self
pub fn with_file_system( manager: Option<&'static Manager>, vfs: &'static VirtualFileSystem, task: TaskIdentifier, ) -> Self
A state whose file-system context is already known.
Sourcepub fn file_system_task(&self) -> Option<TaskIdentifier>
pub fn file_system_task(&self) -> Option<TaskIdentifier>
The task whose identity file pickers act with: the calling process’s, as of its last call. It lives only as long as the state, so a process that ends, or is cancelled, leaves no identity behind for a reused task identifier to inherit.
Sourcepub fn set_file_system(
&mut self,
vfs: &'static VirtualFileSystem,
task: TaskIdentifier,
)
pub fn set_file_system( &mut self, vfs: &'static VirtualFileSystem, task: TaskIdentifier, )
Replace the file-system context of the calling process.
Source§impl State
impl State
Sourcepub fn release_locked(&mut self, guard: &mut GraphicsGuard<'_>)
pub fn release_locked(&mut self, guard: &mut GraphicsGuard<'_>)
Delete the process’s objects under the graphics lock. Afterwards the state owns nothing and dropping it is free. It is safe to call twice.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for State
impl !RefUnwindSafe for State
impl !Send for State
impl !Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl !UnwindSafe for State
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