pub enum FillerControlFlow {
Missing(Vec<(&'static str, Vec<&'static str>)>),
Ready,
Finished,
}
Expand description
The control flow for a filler.
Variants§
Missing(Vec<(&'static str, Vec<&'static str>)>)
The filler is missing a required property.
To allow joining fillers while preserving their associated missing
lists, this variant contains a list of (name, missing)
tuples. When
absorbing another control flow, if both are missing, the missing lists
are combined.
Ready
The filler is ready to fill in the transaction request.
Finished
The filler has filled in all properties that it can fill.
Implementations§
Source§impl FillerControlFlow
impl FillerControlFlow
Sourcepub fn absorb(self, other: Self) -> Self
pub fn absorb(self, other: Self) -> Self
Absorb the control flow of another filler.
§Behavior:
- If either is finished, return the unfinished one
- If either is ready, return ready.
- If both are missing, return missing.
Sourcepub fn missing(name: &'static str, missing: Vec<&'static str>) -> Self
pub fn missing(name: &'static str, missing: Vec<&'static str>) -> Self
Creates a new Missing
control flow.
Sourcepub fn as_missing(&self) -> Option<&[(&'static str, Vec<&'static str>)]>
pub fn as_missing(&self) -> Option<&[(&'static str, Vec<&'static str>)]>
Returns true if the filler is missing a required property.
Sourcepub const fn is_missing(&self) -> bool
pub const fn is_missing(&self) -> bool
Returns true
if the filler is missing information required to fill in
the transaction request.
Sourcepub const fn is_ready(&self) -> bool
pub const fn is_ready(&self) -> bool
Returns true
if the filler is ready to fill in the transaction
request.
Sourcepub const fn is_finished(&self) -> bool
pub const fn is_finished(&self) -> bool
Returns true
if the filler is finished filling in the transaction
request.
Trait Implementations§
Source§impl Clone for FillerControlFlow
impl Clone for FillerControlFlow
Source§fn clone(&self) -> FillerControlFlow
fn clone(&self) -> FillerControlFlow
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FillerControlFlow
impl Debug for FillerControlFlow
Source§impl PartialEq for FillerControlFlow
impl PartialEq for FillerControlFlow
impl Eq for FillerControlFlow
impl StructuralPartialEq for FillerControlFlow
Auto Trait Implementations§
impl Freeze for FillerControlFlow
impl RefUnwindSafe for FillerControlFlow
impl Send for FillerControlFlow
impl Sync for FillerControlFlow
impl Unpin for FillerControlFlow
impl UnwindSafe for FillerControlFlow
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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