pub struct ReadOnlyCapability<T> { /* private fields */ }
Expand description
Helper to define a read-only PciCapability
from an [IntoBytes
] type.
Implementations§
Source§impl<T: IntoBytes + Immutable + KnownLayout> ReadOnlyCapability<T>
impl<T: IntoBytes + Immutable + KnownLayout> ReadOnlyCapability<T>
Sourcepub fn new(label: impl Into<String>, data: T) -> Self
pub fn new(label: impl Into<String>, data: T) -> Self
Create a new ReadOnlyCapability
Trait Implementations§
Source§impl<T: Debug> Debug for ReadOnlyCapability<T>
impl<T: Debug> Debug for ReadOnlyCapability<T>
Source§impl<T: Debug> Inspect for ReadOnlyCapability<T>
impl<T: Debug> Inspect for ReadOnlyCapability<T>
Source§impl<T> PciCapability for ReadOnlyCapability<T>
impl<T> PciCapability for ReadOnlyCapability<T>
Source§impl<T> SaveRestore for ReadOnlyCapability<T>
impl<T> SaveRestore for ReadOnlyCapability<T>
Source§type SavedState = NoSavedState
type SavedState = NoSavedState
The concrete saved state type.
Source§fn restore(
&mut self,
NoSavedState: Self::SavedState,
) -> Result<(), RestoreError>
fn restore( &mut self, NoSavedState: Self::SavedState, ) -> Result<(), RestoreError>
Restores the object’s state.
Auto Trait Implementations§
impl<T> Freeze for ReadOnlyCapability<T>where
T: Freeze,
impl<T> RefUnwindSafe for ReadOnlyCapability<T>where
T: RefUnwindSafe,
impl<T> Send for ReadOnlyCapability<T>where
T: Send,
impl<T> Sync for ReadOnlyCapability<T>where
T: Sync,
impl<T> Unpin for ReadOnlyCapability<T>where
T: Unpin,
impl<T> UnwindSafe for ReadOnlyCapability<T>where
T: UnwindSafe,
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