pub struct LinkCapabilities(/* private fields */);Expand description
Link Capabilities Register
Implementations§
Source§impl LinkCapabilities
impl LinkCapabilities
Sourcepub const fn max_link_speed(&self) -> u32
pub const fn max_link_speed(&self) -> u32
Bits: 0..4
Sourcepub const fn with_max_link_speed_checked(self, value: u32) -> Result<Self, ()>
pub const fn with_max_link_speed_checked(self, value: u32) -> Result<Self, ()>
Bits: 0..4
Sourcepub const fn with_max_link_speed(self, value: u32) -> Self
pub const fn with_max_link_speed(self, value: u32) -> Self
Bits: 0..4
Sourcepub const fn set_max_link_speed(&mut self, value: u32)
pub const fn set_max_link_speed(&mut self, value: u32)
Bits: 0..4
Sourcepub const fn max_link_width(&self) -> u32
pub const fn max_link_width(&self) -> u32
Bits: 4..10
Sourcepub const fn with_max_link_width_checked(self, value: u32) -> Result<Self, ()>
pub const fn with_max_link_width_checked(self, value: u32) -> Result<Self, ()>
Bits: 4..10
Sourcepub const fn with_max_link_width(self, value: u32) -> Self
pub const fn with_max_link_width(self, value: u32) -> Self
Bits: 4..10
Sourcepub const fn set_max_link_width(&mut self, value: u32)
pub const fn set_max_link_width(&mut self, value: u32)
Bits: 4..10
Sourcepub const fn aspm_support(&self) -> u32
pub const fn aspm_support(&self) -> u32
Bits: 10..12
Sourcepub const fn with_aspm_support_checked(self, value: u32) -> Result<Self, ()>
pub const fn with_aspm_support_checked(self, value: u32) -> Result<Self, ()>
Bits: 10..12
Sourcepub const fn with_aspm_support(self, value: u32) -> Self
pub const fn with_aspm_support(self, value: u32) -> Self
Bits: 10..12
Sourcepub const fn set_aspm_support(&mut self, value: u32)
pub const fn set_aspm_support(&mut self, value: u32)
Bits: 10..12
Sourcepub const fn l0s_exit_latency(&self) -> u32
pub const fn l0s_exit_latency(&self) -> u32
Bits: 12..15
Sourcepub const fn with_l0s_exit_latency_checked(self, value: u32) -> Result<Self, ()>
pub const fn with_l0s_exit_latency_checked(self, value: u32) -> Result<Self, ()>
Bits: 12..15
Sourcepub const fn with_l0s_exit_latency(self, value: u32) -> Self
pub const fn with_l0s_exit_latency(self, value: u32) -> Self
Bits: 12..15
Sourcepub const fn set_l0s_exit_latency(&mut self, value: u32)
pub const fn set_l0s_exit_latency(&mut self, value: u32)
Bits: 12..15
Sourcepub const fn set_l0s_exit_latency_checked(
&mut self,
value: u32,
) -> Result<(), ()>
pub const fn set_l0s_exit_latency_checked( &mut self, value: u32, ) -> Result<(), ()>
Bits: 12..15
Sourcepub const fn l1_exit_latency(&self) -> u32
pub const fn l1_exit_latency(&self) -> u32
Bits: 15..18
Sourcepub const fn with_l1_exit_latency_checked(self, value: u32) -> Result<Self, ()>
pub const fn with_l1_exit_latency_checked(self, value: u32) -> Result<Self, ()>
Bits: 15..18
Sourcepub const fn with_l1_exit_latency(self, value: u32) -> Self
pub const fn with_l1_exit_latency(self, value: u32) -> Self
Bits: 15..18
Sourcepub const fn set_l1_exit_latency(&mut self, value: u32)
pub const fn set_l1_exit_latency(&mut self, value: u32)
Bits: 15..18
Sourcepub const fn set_l1_exit_latency_checked(
&mut self,
value: u32,
) -> Result<(), ()>
pub const fn set_l1_exit_latency_checked( &mut self, value: u32, ) -> Result<(), ()>
Bits: 15..18
Sourcepub const fn clock_power_management(&self) -> bool
pub const fn clock_power_management(&self) -> bool
Bits: 18..19
Sourcepub const fn with_clock_power_management_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_clock_power_management_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 18..19
Sourcepub const fn with_clock_power_management(self, value: bool) -> Self
pub const fn with_clock_power_management(self, value: bool) -> Self
Bits: 18..19
Sourcepub const fn set_clock_power_management(&mut self, value: bool)
pub const fn set_clock_power_management(&mut self, value: bool)
Bits: 18..19
Sourcepub const fn set_clock_power_management_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_clock_power_management_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 18..19
Sourcepub const fn surprise_down_error_reporting(&self) -> bool
pub const fn surprise_down_error_reporting(&self) -> bool
Bits: 19..20
Sourcepub const fn with_surprise_down_error_reporting_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_surprise_down_error_reporting_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 19..20
Sourcepub const fn with_surprise_down_error_reporting(self, value: bool) -> Self
pub const fn with_surprise_down_error_reporting(self, value: bool) -> Self
Bits: 19..20
Sourcepub const fn set_surprise_down_error_reporting(&mut self, value: bool)
pub const fn set_surprise_down_error_reporting(&mut self, value: bool)
Bits: 19..20
Sourcepub const fn set_surprise_down_error_reporting_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_surprise_down_error_reporting_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 19..20
Sourcepub const fn data_link_layer_link_active_reporting(&self) -> bool
pub const fn data_link_layer_link_active_reporting(&self) -> bool
Bits: 20..21
Sourcepub const fn with_data_link_layer_link_active_reporting_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_data_link_layer_link_active_reporting_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 20..21
Sourcepub const fn with_data_link_layer_link_active_reporting(
self,
value: bool,
) -> Self
pub const fn with_data_link_layer_link_active_reporting( self, value: bool, ) -> Self
Bits: 20..21
Sourcepub const fn set_data_link_layer_link_active_reporting(&mut self, value: bool)
pub const fn set_data_link_layer_link_active_reporting(&mut self, value: bool)
Bits: 20..21
Sourcepub const fn set_data_link_layer_link_active_reporting_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_data_link_layer_link_active_reporting_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 20..21
Sourcepub const fn link_bandwidth_notification_capability(&self) -> bool
pub const fn link_bandwidth_notification_capability(&self) -> bool
Bits: 21..22
Sourcepub const fn with_link_bandwidth_notification_capability_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_link_bandwidth_notification_capability_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 21..22
Sourcepub const fn with_link_bandwidth_notification_capability(
self,
value: bool,
) -> Self
pub const fn with_link_bandwidth_notification_capability( self, value: bool, ) -> Self
Bits: 21..22
Sourcepub const fn set_link_bandwidth_notification_capability(&mut self, value: bool)
pub const fn set_link_bandwidth_notification_capability(&mut self, value: bool)
Bits: 21..22
Sourcepub const fn set_link_bandwidth_notification_capability_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_link_bandwidth_notification_capability_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 21..22
Sourcepub const fn aspm_optionality_compliance(&self) -> bool
pub const fn aspm_optionality_compliance(&self) -> bool
Bits: 22..23
Sourcepub const fn with_aspm_optionality_compliance_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_aspm_optionality_compliance_checked( self, value: bool, ) -> Result<Self, ()>
Bits: 22..23
Sourcepub const fn with_aspm_optionality_compliance(self, value: bool) -> Self
pub const fn with_aspm_optionality_compliance(self, value: bool) -> Self
Bits: 22..23
Sourcepub const fn set_aspm_optionality_compliance(&mut self, value: bool)
pub const fn set_aspm_optionality_compliance(&mut self, value: bool)
Bits: 22..23
Sourcepub const fn set_aspm_optionality_compliance_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_aspm_optionality_compliance_checked( &mut self, value: bool, ) -> Result<(), ()>
Bits: 22..23
Sourcepub const fn port_number(&self) -> u32
pub const fn port_number(&self) -> u32
Bits: 24..32
Sourcepub const fn with_port_number_checked(self, value: u32) -> Result<Self, ()>
pub const fn with_port_number_checked(self, value: u32) -> Result<Self, ()>
Bits: 24..32
Sourcepub const fn with_port_number(self, value: u32) -> Self
pub const fn with_port_number(self, value: u32) -> Self
Bits: 24..32
Sourcepub const fn set_port_number(&mut self, value: u32)
pub const fn set_port_number(&mut self, value: u32)
Bits: 24..32
Trait Implementations§
Source§impl Clone for LinkCapabilities
impl Clone for LinkCapabilities
Source§fn clone(&self) -> LinkCapabilities
fn clone(&self) -> LinkCapabilities
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 LinkCapabilities
impl Debug for LinkCapabilities
Source§impl Default for LinkCapabilities
impl Default for LinkCapabilities
Source§impl From<LinkCapabilities> for u32
impl From<LinkCapabilities> for u32
Source§fn from(v: LinkCapabilities) -> u32
fn from(v: LinkCapabilities) -> u32
Converts to this type from the input type.
Source§impl From<u32> for LinkCapabilities
impl From<u32> for LinkCapabilities
Source§impl FromBytes for LinkCapabilitieswhere
u32: FromBytes,
impl FromBytes for LinkCapabilitieswhere
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 LinkCapabilitieswhere
u32: FromZeros,
impl FromZeros for LinkCapabilitieswhere
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 LinkCapabilities
impl Inspect for LinkCapabilities
Source§impl IntoBytes for LinkCapabilitieswhere
u32: IntoBytes,
impl IntoBytes for LinkCapabilitieswhere
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 LinkCapabilitieswhere
Self: Sized,
impl KnownLayout for LinkCapabilitieswhere
Self: Sized,
Source§type PointerMetadata = ()
type PointerMetadata = ()
The type of metadata stored in a pointer to
Self. Read more§fn size_for_metadata(meta: Self::PointerMetadata) -> Option<usize>
fn size_for_metadata(meta: Self::PointerMetadata) -> Option<usize>
Computes the size of an object of type
Self with the given pointer
metadata. Read moreSource§impl TryFromBytes for LinkCapabilitieswhere
u32: TryFromBytes,
impl TryFromBytes for LinkCapabilitieswhere
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 LinkCapabilities
impl Immutable for LinkCapabilitieswhere
u32: Immutable,
Auto Trait Implementations§
impl Freeze for LinkCapabilities
impl RefUnwindSafe for LinkCapabilities
impl Send for LinkCapabilities
impl Sync for LinkCapabilities
impl Unpin for LinkCapabilities
impl UnsafeUnpin for LinkCapabilities
impl UnwindSafe for LinkCapabilities
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