pub struct PreferChain(/* private fields */);Expand description
PaymentSelector that prefers chains matching one of the given patterns.
Implementations§
Source§impl PreferChain
impl PreferChain
Sourcepub fn new<P: Into<Vec<ChainIdPattern>>>(patterns: P) -> Self
pub fn new<P: Into<Vec<ChainIdPattern>>>(patterns: P) -> Self
Constructs a selector from patterns.
Sourcepub fn or_chain<P: Into<Vec<ChainIdPattern>>>(self, patterns: P) -> Self
pub fn or_chain<P: Into<Vec<ChainIdPattern>>>(self, patterns: P) -> Self
Appends additional patterns with lower priority.
Trait Implementations§
Source§impl Debug for PreferChain
impl Debug for PreferChain
Source§impl Default for PreferChain
impl Default for PreferChain
Source§fn default() -> PreferChain
fn default() -> PreferChain
Returns the “default value” for a type. Read more
Source§impl PaymentSelector for PreferChain
impl PaymentSelector for PreferChain
Source§fn select<'a>(
&self,
candidates: &[&'a PaymentCandidate],
) -> Option<&'a PaymentCandidate>
fn select<'a>( &self, candidates: &[&'a PaymentCandidate], ) -> Option<&'a PaymentCandidate>
Returns the selected candidate (if any).
Auto Trait Implementations§
impl Freeze for PreferChain
impl RefUnwindSafe for PreferChain
impl Send for PreferChain
impl Sync for PreferChain
impl Unpin for PreferChain
impl UnsafeUnpin for PreferChain
impl UnwindSafe for PreferChain
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