Trait penumbra_dex::component::router::PathSearch
source · pub trait PathSearch: StateRead + Clone + 'static {
// Provided method
fn path_search<'life0, 'async_trait>(
&'life0 self,
src: Id,
dst: Id,
params: RoutingParams
) -> Pin<Box<dyn Future<Output = Result<(Option<Vec<Id>>, Option<U128x128>)>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Available on crate feature
component
only.Provided Methods§
sourcefn path_search<'life0, 'async_trait>(
&'life0 self,
src: Id,
dst: Id,
params: RoutingParams
) -> Pin<Box<dyn Future<Output = Result<(Option<Vec<Id>>, Option<U128x128>)>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn path_search<'life0, 'async_trait>(
&'life0 self,
src: Id,
dst: Id,
params: RoutingParams
) -> Pin<Box<dyn Future<Output = Result<(Option<Vec<Id>>, Option<U128x128>)>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Find the best route from src
to dst
with estimated price strictly less
than params.price_limit
, also returning the spill price for the next-best
route, if one exists.
Object Safety§
This trait is not object safe.