pub trait CandidateSource: Send + Sync {
// Required methods
fn candidates<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
chain: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Candidate>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn searched(&self, chain: Option<&str>) -> String;
// Provided method
fn lists_contracts(&self) -> bool { ... }
}Expand description
Where candidates come from: a DEX search or a venue’s coin list.
Required Methods§
fn candidates<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
symbol: &'life1 str,
chain: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Candidate>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Provided Methods§
Sourcefn lists_contracts(&self) -> bool
fn lists_contracts(&self) -> bool
False for a CEX venue without a coin list: its symbols cannot be checked against contracts.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".