pub fn open_protocol_exclusive<P: ProtocolPointer + ?Sized>(
handle: Handle,
) -> Result<ScopedProtocol<P>>Expand description
Opens a Protocol interface for a handle in exclusive mode.
If successful, a ScopedProtocol is returned that will automatically
close the protocol interface when dropped.
Note that if any other drivers currently have the protocol interface opened
with the OpenProtocolAttributes::ByDriver attribute, they will be
disconnected via disconnect_controller. For example, opening the
SERIAL_IO_PROTOCOL exclusively will disconnect the console driver from it.
ยงErrors
Status::UNSUPPORTED: the handle does not support the protocol.Status::ACCESS_DENIED: the protocol is already open in a way that is incompatible with the new request.