pub struct ChannelSelector {
pub source: Option<Address>,
pub destination: Option<Address>,
pub allowed_states: Vec<ChannelStatusDiscriminants>,
pub closure_time_range: (Bound<DateTime>, Bound<DateTime>),
}Expand description
Selector for channels.
Fields§
§source: Option<Address>Filter by source address.
destination: Option<Address>Filter by destination address
allowed_states: Vec<ChannelStatusDiscriminants>Filter by possible channel states.
closure_time_range: (Bound<DateTime>, Bound<DateTime>)Range of closure times if PendingToClose was specified in allowed_states,
otherwise has no effect.
Implementations§
Source§impl ChannelSelector
impl ChannelSelector
Sourcepub fn with_source<A: Into<Address>>(self, address: A) -> Self
pub fn with_source<A: Into<Address>>(self, address: A) -> Self
Sets the source bound on channel.
Sourcepub fn with_destination<A: Into<Address>>(self, address: A) -> Self
pub fn with_destination<A: Into<Address>>(self, address: A) -> Self
Sets the destination bound on channel.
Sourcepub fn with_allowed_states(
self,
allowed_states: &[ChannelStatusDiscriminants],
) -> Self
pub fn with_allowed_states( self, allowed_states: &[ChannelStatusDiscriminants], ) -> Self
Sets the allowed channel states.
Sourcepub fn with_closure_time_range<T: RangeBounds<DateTime>>(self, range: T) -> Self
pub fn with_closure_time_range<T: RangeBounds<DateTime>>(self, range: T) -> Self
Sets the channel closure range.
This has an effect only if PendingToClose is set in the allowed states.
Sourcepub fn satisfies(&self, channel: &ChannelEntry) -> bool
pub fn satisfies(&self, channel: &ChannelEntry) -> bool
Checks if the given channel satisfies the selector.
Trait Implementations§
Source§impl Clone for ChannelSelector
impl Clone for ChannelSelector
Source§fn clone(&self) -> ChannelSelector
fn clone(&self) -> ChannelSelector
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChannelSelector
impl Debug for ChannelSelector
Source§impl Default for ChannelSelector
impl Default for ChannelSelector
Source§impl PartialEq for ChannelSelector
impl PartialEq for ChannelSelector
impl Eq for ChannelSelector
impl StructuralPartialEq for ChannelSelector
Auto Trait Implementations§
impl Freeze for ChannelSelector
impl RefUnwindSafe for ChannelSelector
impl Send for ChannelSelector
impl Sync for ChannelSelector
impl Unpin for ChannelSelector
impl UnwindSafe for ChannelSelector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more