Struct ethers_contract::SelectContracts
source · pub struct SelectContracts { /* private fields */ }
Available on crate feature
abigen
only.Expand description
A Contract Filter that only includes certain contracts.
Note:: matching by exact name and via regex stacks
This is the inverse of ExcludeContracts
Implementations§
source§impl SelectContracts
impl SelectContracts
sourcepub fn add_name<T>(self, arg: T) -> SelectContractswhere
T: Into<String>,
pub fn add_name<T>(self, arg: T) -> SelectContractswhere
T: Into<String>,
Adds an exact name to the filter
sourcepub fn extend_names<I, S>(self, name: I) -> SelectContractswhere
I: IntoIterator<Item = S>,
S: Into<String>,
pub fn extend_names<I, S>(self, name: I) -> SelectContractswhere
I: IntoIterator<Item = S>,
S: Into<String>,
Adds multiple exact names to the filter
sourcepub fn add_regex(self, re: Regex) -> SelectContracts
pub fn add_regex(self, re: Regex) -> SelectContracts
sourcepub fn extend_regex<I, S>(self, regexes: I) -> SelectContractswhere
I: IntoIterator<Item = S>,
S: Into<Regex>,
pub fn extend_regex<I, S>(self, regexes: I) -> SelectContractswhere
I: IntoIterator<Item = S>,
S: Into<Regex>,
Adds multiple exact names to the filter
sourcepub fn add_pattern(self, pattern: impl AsRef<str>) -> SelectContracts
pub fn add_pattern(self, pattern: impl AsRef<str>) -> SelectContracts
sourcepub fn try_add_pattern(
self,
s: impl AsRef<str>
) -> Result<SelectContracts, Error>
pub fn try_add_pattern(
self,
s: impl AsRef<str>
) -> Result<SelectContracts, Error>
Sets the pattern to use
sourcepub fn extend_pattern<I, S>(self, patterns: I) -> SelectContractswhere
I: IntoIterator<Item = S>,
S: AsRef<str>,
pub fn extend_pattern<I, S>(self, patterns: I) -> SelectContractswhere
I: IntoIterator<Item = S>,
S: AsRef<str>,
sourcepub fn try_extend_pattern<I, S>(
self,
patterns: I
) -> Result<SelectContracts, Error>where
I: IntoIterator<Item = S>,
S: AsRef<str>,
pub fn try_extend_pattern<I, S>(
self,
patterns: I
) -> Result<SelectContracts, Error>where
I: IntoIterator<Item = S>,
S: AsRef<str>,
Trait Implementations§
source§impl Clone for SelectContracts
impl Clone for SelectContracts
source§fn clone(&self) -> SelectContracts
fn clone(&self) -> SelectContracts
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 SelectContracts
impl Debug for SelectContracts
source§impl Default for SelectContracts
impl Default for SelectContracts
source§fn default() -> SelectContracts
fn default() -> SelectContracts
Returns the “default value” for a type. Read more
source§impl From<SelectContracts> for ContractFilter
impl From<SelectContracts> for ContractFilter
source§fn from(f: SelectContracts) -> ContractFilter
fn from(f: SelectContracts) -> ContractFilter
Converts to this type from the input type.