Struct uefi::table::boot::ScopedProtocol
source · pub struct ScopedProtocol<'a, P: Protocol + ?Sized> { /* private fields */ }
Expand description
An open protocol interface. Automatically closes the protocol interface on drop.
Most protocols have interface data associated with them. ScopedProtocol
implements Deref
and DerefMut
to access this data. A few protocols
(such as DevicePath
and LoadedImageDevicePath
) may be installed with
null interface data, in which case Deref
and DerefMut
will
panic. The get
and get_mut
methods may be used to access the
optional interface data without panicking.
See also the BootServices
documentation for details of how to open a
protocol and why UnsafeCell
is used.
Implementations§
source§impl<'a, P: Protocol + ?Sized> ScopedProtocol<'a, P>
impl<'a, P: Protocol + ?Sized> ScopedProtocol<'a, P>
Trait Implementations§
Auto Trait Implementations§
impl<'a, P> Freeze for ScopedProtocol<'a, P>where
P: ?Sized,
impl<'a, P> !RefUnwindSafe for ScopedProtocol<'a, P>
impl<'a, P> !Send for ScopedProtocol<'a, P>
impl<'a, P> !Sync for ScopedProtocol<'a, P>
impl<'a, P> Unpin for ScopedProtocol<'a, P>where
P: ?Sized,
impl<'a, P> !UnwindSafe for ScopedProtocol<'a, P>
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