pub struct TpmDeviceSynchronousProxy { /* private fields */ }
Implementations§
Source§impl TpmDeviceSynchronousProxy
impl TpmDeviceSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<TpmDeviceEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<TpmDeviceEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn get_device_id(
&self,
___deadline: MonotonicInstant,
) -> Result<TpmDeviceGetDeviceIdResult, Error>
pub fn get_device_id( &self, ___deadline: MonotonicInstant, ) -> Result<TpmDeviceGetDeviceIdResult, Error>
Get the TPM’s device ID, vendor ID, and revision ID.
Sourcepub fn execute_vendor_command(
&self,
command_code: u16,
data: &[u8],
___deadline: MonotonicInstant,
) -> Result<TpmDeviceExecuteVendorCommandResult, Error>
pub fn execute_vendor_command( &self, command_code: u16, data: &[u8], ___deadline: MonotonicInstant, ) -> Result<TpmDeviceExecuteVendorCommandResult, Error>
Execute a vendor command. This method will construct a header for the TPM command from the command_code. The data section should just contain the body of the command and not the header. Returns ZX_ERR_BUFFER_TOO_SMALL if the TPM responded with data that wouldn’t fit in the response buffer.
Sourcepub fn execute_command(
&self,
data: &[u8],
___deadline: MonotonicInstant,
) -> Result<TpmDeviceExecuteCommandResult, Error>
pub fn execute_command( &self, data: &[u8], ___deadline: MonotonicInstant, ) -> Result<TpmDeviceExecuteCommandResult, Error>
Execute a complete command. This method expects a complete command passed in data including any header required. Returns ZX_ERR_BUFFER_TOO_SMALL if the TPM responded with data that wouldn’t fit in the response buffer.
Trait Implementations§
Source§impl Debug for TpmDeviceSynchronousProxy
impl Debug for TpmDeviceSynchronousProxy
Source§impl SynchronousProxy for TpmDeviceSynchronousProxy
impl SynchronousProxy for TpmDeviceSynchronousProxy
Source§type Proxy = TpmDeviceProxy
type Proxy = TpmDeviceProxy
The async proxy for the same protocol.
Source§type Protocol = TpmDeviceMarker
type Protocol = TpmDeviceMarker
The protocol which this
Proxy
controls.Source§fn from_channel(inner: Channel) -> Self
fn from_channel(inner: Channel) -> Self
Create a proxy over the given channel.
Source§fn into_channel(self) -> Channel
fn into_channel(self) -> Channel
Convert the proxy back into a channel.
Source§fn as_channel(&self) -> &Channel
fn as_channel(&self) -> &Channel
Get a reference to the proxy’s underlying channel. Read more
Auto Trait Implementations§
impl Freeze for TpmDeviceSynchronousProxy
impl RefUnwindSafe for TpmDeviceSynchronousProxy
impl Send for TpmDeviceSynchronousProxy
impl Sync for TpmDeviceSynchronousProxy
impl Unpin for TpmDeviceSynchronousProxy
impl UnwindSafe for TpmDeviceSynchronousProxy
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