pub struct PCIDevice {
pub address: String,
pub parent: Option<Box<PCIDevice>>,
}Fields§
§address: String§parent: Option<Box<PCIDevice>>Implementations§
Source§impl PCIDevice
impl PCIDevice
pub fn new(address: String) -> Self
pub fn get_path_to_root(&self) -> Vec<String>
pub fn get_numa_node(&self) -> Option<i32>
pub fn distance_to(&self, other: &PCIDevice) -> f64
Sourcepub fn find_closest(&self, candidate_devices: &[PCIDevice]) -> Option<usize>
pub fn find_closest(&self, candidate_devices: &[PCIDevice]) -> Option<usize>
Find the index of the closest device from a list of candidates
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PCIDevice
impl RefUnwindSafe for PCIDevice
impl Send for PCIDevice
impl Sync for PCIDevice
impl Unpin for PCIDevice
impl UnwindSafe for PCIDevice
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more