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 update_adaptive_concurrency(&mut 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 from_subnet(subnet: &str) -> Result<Self>
pub fn from_subnet(subnet: &str) -> Result<Self>
Create a new MinerFactory with a subnet
Sourcepub fn with_subnet(self, subnet: &str) -> Result<Self>
pub fn with_subnet(self, subnet: &str) -> Result<Self>
Add a subnet to the IP range
Sourcepub fn set_subnet(&mut self, subnet: &str) -> Result<&Self>
pub fn set_subnet(&mut self, subnet: &str) -> Result<&Self>
Set the subnet range to use, removing all other IPs
Sourcepub fn from_octets(
octet1: &str,
octet2: &str,
octet3: &str,
octet4: &str,
) -> Result<Self>
pub fn from_octets( octet1: &str, octet2: &str, octet3: &str, octet4: &str, ) -> Result<Self>
Create a new MinerFactory with an octet range
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>
Add an octet range to the IP range
Sourcepub fn set_octets(
&mut self,
octet1: &str,
octet2: &str,
octet3: &str,
octet4: &str,
) -> Result<&Self>
pub fn set_octets( &mut self, octet1: &str, octet2: &str, octet3: &str, octet4: &str, ) -> Result<&Self>
Set the octet range to use, removing all other IPs
Sourcepub fn from_range(range_str: &str) -> Result<Self>
pub fn from_range(range_str: &str) -> Result<Self>
Create a new MinerFactory with a range string in the format “10.1-199.0.1-199”
Sourcepub fn with_range(self, range_str: &str) -> Result<Self>
pub fn with_range(self, range_str: &str) -> Result<Self>
Add a range string in the format “10.1-199.0.1-199”
Sourcepub fn set_range(&mut self, range_str: &str) -> Result<&Self>
pub fn set_range(&mut self, range_str: &str) -> Result<&Self>
Set the range string in the format “10.1-199.0.1-199”, replacing all other IPs
pub fn scan_stream( &self, ) -> Pin<Box<impl Stream<Item = Box<dyn Miner>> + Send + use<>>>
pub fn scan_stream_with_ip( &self, ) -> Pin<Box<impl Stream<Item = (IpAddr, Option<Box<dyn Miner>>)> + Send + use<>>>
Trait Implementations§
Source§impl Clone for MinerFactory
impl Clone for MinerFactory
Source§fn clone(&self) -> MinerFactory
fn clone(&self) -> MinerFactory
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 MinerFactory
impl Debug for MinerFactory
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