pub struct SchemePolicy(/* private fields */);Expand description
Keeps only candidates whose scheme name is in the allow-list.
Implementations§
Source§impl SchemePolicy
impl SchemePolicy
Sourcepub fn new<S: Into<CompactString>, I: IntoIterator<Item = S>>(
schemes: I,
) -> Self
pub fn new<S: Into<CompactString>, I: IntoIterator<Item = S>>( schemes: I, ) -> Self
Constructs the policy from an iterator of names.
Trait Implementations§
Source§impl Debug for SchemePolicy
impl Debug for SchemePolicy
Source§impl Default for SchemePolicy
impl Default for SchemePolicy
Source§fn default() -> SchemePolicy
fn default() -> SchemePolicy
Returns the “default value” for a type. Read more
Source§impl PaymentPolicy for SchemePolicy
impl PaymentPolicy for SchemePolicy
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 SchemePolicy
impl RefUnwindSafe for SchemePolicy
impl Send for SchemePolicy
impl Sync for SchemePolicy
impl Unpin for SchemePolicy
impl UnsafeUnpin for SchemePolicy
impl UnwindSafe for SchemePolicy
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