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