pub struct LabBench { /* private fields */ }Expand description
A representation of all the nLabs plugged into a computer
Implementations§
Source§impl LabBench
impl LabBench
Sourcepub fn new() -> Result<LabBench, Box<dyn Error>>
pub fn new() -> Result<LabBench, Box<dyn Error>>
Creates a new lab bench, searching the computer for nLab links
Sourcepub fn list(&self) -> impl Iterator<Item = NlabLink> + '_
pub fn list(&self) -> impl Iterator<Item = NlabLink> + '_
Returns iterator containing information about detected nLabs plugged into the computer
Sourcepub fn open_all_available(&self) -> Vec<Nlab>
pub fn open_all_available(&self) -> Vec<Nlab>
Returns a vector containing all nLabs that are available
Sourcepub fn open_first_available(&self, power_on: bool) -> Result<Nlab, Error>
pub fn open_first_available(&self, power_on: bool) -> Result<Nlab, Error>
Returns the first available nLab
Sourcepub fn get_first_in_dfu(&self) -> Option<NlabLink>
pub fn get_first_in_dfu(&self) -> Option<NlabLink>
Returns the first nLab that is in DFU mode
Sourcepub fn get_first_needing_update(&self) -> Option<NlabLink>
pub fn get_first_needing_update(&self) -> Option<NlabLink>
Returns the first nLab that is available and needs an update
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LabBench
impl RefUnwindSafe for LabBench
impl Send for LabBench
impl Sync for LabBench
impl Unpin for LabBench
impl UnwindSafe for LabBench
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