Struct furiosa_device::DeviceFile
source · pub struct DeviceFile { /* private fields */ }
Expand description
An abstraction for a device file and its mode.
Implementations§
source§impl DeviceFile
impl DeviceFile
sourcepub fn device_index(&self) -> u8
pub fn device_index(&self) -> u8
Returns the device index (e.g., 1 for npu1pe0).
sourcepub fn core_range(&self) -> CoreRange
pub fn core_range(&self) -> CoreRange
Returns the range of cores this device file may occupy.
sourcepub fn mode(&self) -> DeviceMode
pub fn mode(&self) -> DeviceMode
Return the mode of this device file.
Trait Implementations§
source§impl Clone for DeviceFile
impl Clone for DeviceFile
source§fn clone(&self) -> DeviceFile
fn clone(&self) -> DeviceFile
Returns a copy 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 DeviceFile
impl Debug for DeviceFile
source§impl Display for DeviceFile
impl Display for DeviceFile
source§impl Hash for DeviceFile
impl Hash for DeviceFile
source§impl PartialEq<DeviceFile> for DeviceFile
impl PartialEq<DeviceFile> for DeviceFile
source§fn eq(&self, other: &DeviceFile) -> bool
fn eq(&self, other: &DeviceFile) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<&PathBuf> for DeviceFile
impl TryFrom<&PathBuf> for DeviceFile
impl Eq for DeviceFile
impl StructuralEq for DeviceFile
impl StructuralPartialEq for DeviceFile
Auto Trait Implementations§
impl RefUnwindSafe for DeviceFile
impl Send for DeviceFile
impl Sync for DeviceFile
impl Unpin for DeviceFile
impl UnwindSafe for DeviceFile
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