pub struct MinerFactory { /* private fields */ }Implementations§
Source§impl MinerFactory
impl MinerFactory
pub async fn scan_miner(&self, ip: IpAddr) -> Result<Option<Box<dyn Miner>>>
pub async fn get_miner(&self, ip: IpAddr) -> Result<Option<Box<dyn Miner>>>
pub fn new() -> MinerFactory
pub fn with_port_check(self, enabled: bool) -> Self
pub fn with_concurrent_limit(self, limit: usize) -> Self
pub fn with_adaptive_concurrency(self) -> Self
pub fn with_identification_timeout(self, timeout: Duration) -> Self
pub fn with_identification_timeout_secs(self, timeout_secs: u64) -> Self
pub fn with_connectivity_timeout(self, timeout: Duration) -> Self
pub fn with_connectivity_timeout_secs(self, timeout_secs: u64) -> Self
pub fn with_connectivity_retries(self, retries: u32) -> Self
pub fn with_search_makes(self, search_makes: Vec<MinerMake>) -> Self
pub fn with_makes(self, makes: Vec<MinerMake>) -> Self
pub fn add_search_make(self, search_make: MinerMake) -> Self
pub fn remove_search_make(self, search_make: MinerMake) -> Self
pub fn with_search_firmwares(self, search_firmwares: Vec<MinerFirmware>) -> Self
pub fn with_firmwares(self, firmwares: Vec<MinerFirmware>) -> Self
pub fn add_search_firmware(self, search_firmware: MinerFirmware) -> Self
pub fn remove_search_firmware(self, search_firmware: MinerFirmware) -> Self
Sourcepub fn with_subnet(self, subnet: &str) -> Result<Self>
pub fn with_subnet(self, subnet: &str) -> Result<Self>
Set IPs from a subnet
pub fn set_subnet(&mut self, subnet: &str) -> Result<&Self>
Sourcepub fn with_octets(
self,
octet1: &str,
octet2: &str,
octet3: &str,
octet4: &str,
) -> Result<Self>
pub fn with_octets( self, octet1: &str, octet2: &str, octet3: &str, octet4: &str, ) -> Result<Self>
Set IPs from octet ranges
pub fn set_octets( &mut self, octet1: &str, octet2: &str, octet3: &str, octet4: &str, ) -> Result<&Self>
Sourcepub fn with_range(self, range_str: &str) -> Result<Self>
pub fn with_range(self, range_str: &str) -> Result<Self>
Set IPs from a range string in the format “10.1-199.0.1-199”
pub fn scan_stream(&self) -> Result<impl Stream<Item = Box<dyn Miner>>>
pub fn scan_stream_with_ip( &self, ) -> Result<impl Stream<Item = (IpAddr, Option<Box<dyn Miner>>)>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MinerFactory
impl RefUnwindSafe for MinerFactory
impl Send for MinerFactory
impl Sync for MinerFactory
impl Unpin for MinerFactory
impl UnwindSafe for MinerFactory
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