pub struct TpmPosixDeviceBuilder { /* private fields */ }Expand description
A builder for constructing a TpmPosixDevice.
Implementations§
Source§impl TpmPosixDeviceBuilder
impl TpmPosixDeviceBuilder
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Sets the operation timeout.
Sourcepub fn with_interrupted<F>(self, handler: F) -> Self
pub fn with_interrupted<F>(self, handler: F) -> Self
Sets the interruption check callback.
Sourcepub fn build(self) -> Result<TpmPosixDevice, TpmDeviceError>
pub fn build(self) -> Result<TpmPosixDevice, TpmDeviceError>
Opens the TPM character device and constructs the TpmPosixDevice.
§Errors
Returns Io when the device file cannot be
opened or when configuring the file descriptor flags fails.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TpmPosixDeviceBuilder
impl !Send for TpmPosixDeviceBuilder
impl !Sync for TpmPosixDeviceBuilder
impl !UnwindSafe for TpmPosixDeviceBuilder
impl Freeze for TpmPosixDeviceBuilder
impl Unpin for TpmPosixDeviceBuilder
impl UnsafeUnpin for TpmPosixDeviceBuilder
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