Skip to main content

open_protocol_exclusive

Function open_protocol_exclusive 

Source
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