pub struct DeviceCapabilities(/* private fields */);
Expand description
Device Capabilities Register (From the 6.4 spec)
Implementations§
Source§impl DeviceCapabilities
impl DeviceCapabilities
Sourcepub const fn max_payload_size(&self) -> u32
pub const fn max_payload_size(&self) -> u32
Bits: 0..3
Sourcepub const fn with_max_payload_size_checked(self, value: u32) -> Result<Self, ()>
pub const fn with_max_payload_size_checked(self, value: u32) -> Result<Self, ()>
Bits: 0..3
Sourcepub const fn with_max_payload_size(self, value: u32) -> Self
pub const fn with_max_payload_size(self, value: u32) -> Self
Bits: 0..3
Sourcepub const fn set_max_payload_size(&mut self, value: u32)
pub const fn set_max_payload_size(&mut self, value: u32)
Bits: 0..3
Sourcepub const fn set_max_payload_size_checked(
&mut self,
value: u32,
) -> Result<(), ()>
pub const fn set_max_payload_size_checked( &mut self, value: u32, ) -> Result<(), ()>
Bits: 0..3
Sourcepub const fn phantom_functions(&self) -> u32
pub const fn phantom_functions(&self) -> u32
Bits: 3..5
Sourcepub const fn with_phantom_functions_checked(
self,
value: u32,
) -> Result<Self, ()>
pub const fn with_phantom_functions_checked( self, value: u32, ) -> Result<Self, ()>
Bits: 3..5
Sourcepub const fn with_phantom_functions(self, value: u32) -> Self
pub const fn with_phantom_functions(self, value: u32) -> Self
Bits: 3..5
Sourcepub const fn set_phantom_functions(&mut self, value: u32)
pub const fn set_phantom_functions(&mut self, value: u32)
Bits: 3..5
Sourcepub const fn set_phantom_functions_checked(
&mut self,
value: u32,
) -> Result<(), ()>
pub const fn set_phantom_functions_checked( &mut self, value: u32, ) -> Result<(), ()>
Bits: 3..5
Sourcepub const fn ext_tag_field(&self) -> bool
pub const fn ext_tag_field(&self) -> bool
Bits: 5..6
Sourcepub const fn with_ext_tag_field_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_ext_tag_field_checked(self, value: bool) -> Result<Self, ()>
Bits: 5..6
Sourcepub const fn with_ext_tag_field(self, value: bool) -> Self
pub const fn with_ext_tag_field(self, value: bool) -> Self
Bits: 5..6
Sourcepub const fn set_ext_tag_field(&mut self, value: bool)
pub const fn set_ext_tag_field(&mut self, value: bool)
Bits: 5..6
Sourcepub const fn endpoint_l0s_latency(&self) -> u32
pub const fn endpoint_l0s_latency(&self) -> u32
Bits: 6..9
Sourcepub const fn with_endpoint_l0s_latency_checked(
self,
value: u32,
) -> Result<Self, ()>
pub const fn with_endpoint_l0s_latency_checked( self, value: u32, ) -> Result<Self, ()>
Bits: 6..9
Sourcepub const fn with_endpoint_l0s_latency(self, value: u32) -> Self
pub const fn with_endpoint_l0s_latency(self, value: u32) -> Self
Bits: 6..9
Sourcepub const fn set_endpoint_l0s_latency(&mut self, value: u32)
pub const fn set_endpoint_l0s_latency(&mut self, value: u32)
Bits: 6..9
Sourcepub const fn set_endpoint_l0s_latency_checked(
&mut self,
value: u32,
) -> Result<(), ()>
pub const fn set_endpoint_l0s_latency_checked( &mut self, value: u32, ) -> Result<(), ()>
Bits: 6..9
Sourcepub const fn endpoint_l1_latency(&self) -> u32
pub const fn endpoint_l1_latency(&self) -> u32
Bits: 9..12
Sourcepub const fn with_endpoint_l1_latency_checked(
self,
value: u32,
) -> Result<Self, ()>
pub const fn with_endpoint_l1_latency_checked( self, value: u32, ) -> Result<Self, ()>
Bits: 9..12
Sourcepub const fn with_endpoint_l1_latency(self, value: u32) -> Self
pub const fn with_endpoint_l1_latency(self, value: u32) -> Self
Bits: 9..12
Sourcepub const fn set_endpoint_l1_latency(&mut self, value: u32)
pub const fn set_endpoint_l1_latency(&mut self, value: u32)
Bits: 9..12
Sourcepub const fn set_endpoint_l1_latency_checked(
&mut self,
value: u32,
) -> Result<(), ()>
pub const fn set_endpoint_l1_latency_checked( &mut self, value: u32, ) -> Result<(), ()>
Bits: 9..12
Sourcepub const fn role_based_error(&self) -> bool
pub const fn role_based_error(&self) -> bool
Bits: 15..16
Sourcepub const fn with_role_based_error_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_role_based_error_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 15..16
Sourcepub const fn with_role_based_error(self, value: bool) -> Self
pub const fn with_role_based_error(self, value: bool) -> Self
Bits: 15..16
Sourcepub const fn set_role_based_error(&mut self, value: bool)
pub const fn set_role_based_error(&mut self, value: bool)
Bits: 15..16
Sourcepub const fn set_role_based_error_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_role_based_error_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 15..16
Sourcepub const fn err_cor_subclass_capable(&self) -> bool
pub const fn err_cor_subclass_capable(&self) -> bool
Bits: 16..17
Sourcepub const fn with_err_cor_subclass_capable_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_err_cor_subclass_capable_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 16..17
Sourcepub const fn with_err_cor_subclass_capable(self, value: bool) -> Self
pub const fn with_err_cor_subclass_capable(self, value: bool) -> Self
Bits: 16..17
Sourcepub const fn set_err_cor_subclass_capable(&mut self, value: bool)
pub const fn set_err_cor_subclass_capable(&mut self, value: bool)
Bits: 16..17
Sourcepub const fn set_err_cor_subclass_capable_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_err_cor_subclass_capable_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 16..17
Sourcepub const fn rx_mps_fixed(&self) -> bool
pub const fn rx_mps_fixed(&self) -> bool
Bits: 17..18
Sourcepub const fn with_rx_mps_fixed_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_rx_mps_fixed_checked(self, value: bool) -> Result<Self, ()>
Bits: 17..18
Sourcepub const fn with_rx_mps_fixed(self, value: bool) -> Self
pub const fn with_rx_mps_fixed(self, value: bool) -> Self
Bits: 17..18
Sourcepub const fn set_rx_mps_fixed(&mut self, value: bool)
pub const fn set_rx_mps_fixed(&mut self, value: bool)
Bits: 17..18
Sourcepub const fn captured_slot_power_limit(&self) -> u32
pub const fn captured_slot_power_limit(&self) -> u32
Bits: 18..26
Sourcepub const fn with_captured_slot_power_limit_checked(
self,
value: u32,
) -> Result<Self, ()>
pub const fn with_captured_slot_power_limit_checked( self, value: u32, ) -> Result<Self, ()>
Bits: 18..26
Sourcepub const fn with_captured_slot_power_limit(self, value: u32) -> Self
pub const fn with_captured_slot_power_limit(self, value: u32) -> Self
Bits: 18..26
Sourcepub const fn set_captured_slot_power_limit(&mut self, value: u32)
pub const fn set_captured_slot_power_limit(&mut self, value: u32)
Bits: 18..26
Sourcepub const fn set_captured_slot_power_limit_checked(
&mut self,
value: u32,
) -> Result<(), ()>
pub const fn set_captured_slot_power_limit_checked( &mut self, value: u32, ) -> Result<(), ()>
Bits: 18..26
Sourcepub const fn captured_slot_power_scale(&self) -> u32
pub const fn captured_slot_power_scale(&self) -> u32
Bits: 26..28
Sourcepub const fn with_captured_slot_power_scale_checked(
self,
value: u32,
) -> Result<Self, ()>
pub const fn with_captured_slot_power_scale_checked( self, value: u32, ) -> Result<Self, ()>
Bits: 26..28
Sourcepub const fn with_captured_slot_power_scale(self, value: u32) -> Self
pub const fn with_captured_slot_power_scale(self, value: u32) -> Self
Bits: 26..28
Sourcepub const fn set_captured_slot_power_scale(&mut self, value: u32)
pub const fn set_captured_slot_power_scale(&mut self, value: u32)
Bits: 26..28
Sourcepub const fn set_captured_slot_power_scale_checked(
&mut self,
value: u32,
) -> Result<(), ()>
pub const fn set_captured_slot_power_scale_checked( &mut self, value: u32, ) -> Result<(), ()>
Bits: 26..28
Sourcepub const fn function_level_reset(&self) -> bool
pub const fn function_level_reset(&self) -> bool
Bits: 28..29
Sourcepub const fn with_function_level_reset_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_function_level_reset_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 28..29
Sourcepub const fn with_function_level_reset(self, value: bool) -> Self
pub const fn with_function_level_reset(self, value: bool) -> Self
Bits: 28..29
Sourcepub const fn set_function_level_reset(&mut self, value: bool)
pub const fn set_function_level_reset(&mut self, value: bool)
Bits: 28..29
Sourcepub const fn set_function_level_reset_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_function_level_reset_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 28..29
Sourcepub const fn mixed_mps_supported(&self) -> bool
pub const fn mixed_mps_supported(&self) -> bool
Bits: 29..30
Sourcepub const fn with_mixed_mps_supported_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_mixed_mps_supported_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 29..30
Sourcepub const fn with_mixed_mps_supported(self, value: bool) -> Self
pub const fn with_mixed_mps_supported(self, value: bool) -> Self
Bits: 29..30
Sourcepub const fn set_mixed_mps_supported(&mut self, value: bool)
pub const fn set_mixed_mps_supported(&mut self, value: bool)
Bits: 29..30
Sourcepub const fn set_mixed_mps_supported_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_mixed_mps_supported_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 29..30
Sourcepub const fn tee_io_supported(&self) -> bool
pub const fn tee_io_supported(&self) -> bool
Bits: 30..31
Sourcepub const fn with_tee_io_supported_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_tee_io_supported_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 30..31
Sourcepub const fn with_tee_io_supported(self, value: bool) -> Self
pub const fn with_tee_io_supported(self, value: bool) -> Self
Bits: 30..31
Sourcepub const fn set_tee_io_supported(&mut self, value: bool)
pub const fn set_tee_io_supported(&mut self, value: bool)
Bits: 30..31
Trait Implementations§
Source§impl Clone for DeviceCapabilities
impl Clone for DeviceCapabilities
Source§fn clone(&self) -> DeviceCapabilities
fn clone(&self) -> DeviceCapabilities
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DeviceCapabilities
impl Debug for DeviceCapabilities
Source§impl Default for DeviceCapabilities
impl Default for DeviceCapabilities
Source§impl From<DeviceCapabilities> for u32
impl From<DeviceCapabilities> for u32
Source§fn from(v: DeviceCapabilities) -> u32
fn from(v: DeviceCapabilities) -> u32
Converts to this type from the input type.
Source§impl From<u32> for DeviceCapabilities
impl From<u32> for DeviceCapabilities
Source§impl FromBytes for DeviceCapabilitieswhere
u32: FromBytes,
impl FromBytes for DeviceCapabilitieswhere
u32: FromBytes,
§fn ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: KnownLayout + Immutable,
fn ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: KnownLayout + Immutable,
§fn ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: KnownLayout + Immutable,
fn ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: KnownLayout + Immutable,
§fn ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: Immutable + KnownLayout,
fn ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, Infallible>>where
Self: Immutable + KnownLayout,
Interprets the suffix of the given bytes as a
&Self
. Read more§fn mut_from_bytes(
source: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
fn mut_from_bytes(
source: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
§fn mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
fn mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
§fn mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
fn mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, Infallible>>where
Self: IntoBytes + KnownLayout,
Source§impl FromZeros for DeviceCapabilitieswhere
u32: FromZeros,
impl FromZeros for DeviceCapabilitieswhere
u32: FromZeros,
§fn new_zeroed() -> Selfwhere
Self: Sized,
fn new_zeroed() -> Selfwhere
Self: Sized,
Creates an instance of
Self
from zeroed bytes. Read more§fn new_box_zeroed() -> Result<Box<Self>, AllocError>where
Self: Sized,
fn new_box_zeroed() -> Result<Box<Self>, AllocError>where
Self: Sized,
Creates a
Box<Self>
from zeroed bytes. Read more§fn new_vec_zeroed(len: usize) -> Result<Vec<Self>, AllocError>where
Self: Sized,
fn new_vec_zeroed(len: usize) -> Result<Vec<Self>, AllocError>where
Self: Sized,
Creates a
Vec<Self>
from zeroed bytes. Read moreSource§impl Inspect for DeviceCapabilities
impl Inspect for DeviceCapabilities
Source§impl IntoBytes for DeviceCapabilitieswhere
u32: IntoBytes,
impl IntoBytes for DeviceCapabilitieswhere
u32: IntoBytes,
§fn as_mut_bytes(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_mut_bytes(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
Gets the bytes of this value mutably. Read more
§fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>where
Self: Immutable,
fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>where
Self: Immutable,
Source§impl KnownLayout for DeviceCapabilitieswhere
Self: Sized,
impl KnownLayout for DeviceCapabilitieswhere
Self: Sized,
Source§type PointerMetadata = ()
type PointerMetadata = ()
The type of metadata stored in a pointer to
Self
. Read moreSource§impl TryFromBytes for DeviceCapabilitieswhere
u32: TryFromBytes,
impl TryFromBytes for DeviceCapabilitieswhere
u32: TryFromBytes,
§fn try_ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
§fn try_ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
§fn try_ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
§fn try_mut_from_bytes(
bytes: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
fn try_mut_from_bytes(
bytes: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
§fn try_mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
fn try_mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
§fn try_mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
fn try_mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout + IntoBytes,
§fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
impl Copy for DeviceCapabilities
impl Immutable for DeviceCapabilitieswhere
u32: Immutable,
Auto Trait Implementations§
impl Freeze for DeviceCapabilities
impl RefUnwindSafe for DeviceCapabilities
impl Send for DeviceCapabilities
impl Sync for DeviceCapabilities
impl Unpin for DeviceCapabilities
impl UnwindSafe for DeviceCapabilities
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