pub struct NetworkPolicy(/* private fields */);Expand description
Keeps only candidates whose chain matches one of the patterns.
Implementations§
Source§impl NetworkPolicy
impl NetworkPolicy
Sourcepub fn new<P: Into<Vec<ChainIdPattern>>>(patterns: P) -> Self
pub fn new<P: Into<Vec<ChainIdPattern>>>(patterns: P) -> Self
Constructs the policy from a list of patterns.
Trait Implementations§
Source§impl Debug for NetworkPolicy
impl Debug for NetworkPolicy
Source§impl Default for NetworkPolicy
impl Default for NetworkPolicy
Source§fn default() -> NetworkPolicy
fn default() -> NetworkPolicy
Returns the “default value” for a type. Read more
Source§impl PaymentPolicy for NetworkPolicy
impl PaymentPolicy for NetworkPolicy
Source§fn apply<'a>(
&self,
candidates: Vec<&'a PaymentCandidate>,
) -> Vec<&'a PaymentCandidate>
fn apply<'a>( &self, candidates: Vec<&'a PaymentCandidate>, ) -> Vec<&'a PaymentCandidate>
Returns the subset of candidates that pass this policy.
Auto Trait Implementations§
impl Freeze for NetworkPolicy
impl RefUnwindSafe for NetworkPolicy
impl Send for NetworkPolicy
impl Sync for NetworkPolicy
impl Unpin for NetworkPolicy
impl UnsafeUnpin for NetworkPolicy
impl UnwindSafe for NetworkPolicy
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