struct Flow<'a> {
nodes: Vec<(&'a FlowNode, Option<BlockKind>)>,
index: HashMap<&'a str, usize>,
out: HashMap<&'a str, Vec<&'a str>>,
past_no: HashMap<&'a str, Vec<&'a str>>,
incoming: HashMap<&'a str, Vec<&'a str>>,
roots: Vec<&'a str>,
foreach_of: HashMap<&'a str, &'a FlowNode>,
fields: &'a [PayloadField],
outside: HashSet<&'a str>,
}Expand description
What the check knows about a graph.
Fields§
§nodes: Vec<(&'a FlowNode, Option<BlockKind>)>§index: HashMap<&'a str, usize>§out: HashMap<&'a str, Vec<&'a str>>§past_no: HashMap<&'a str, Vec<&'a str>>Where an Approval’s error edges go. A no and a silence fail the block, and only an error edge takes them, so these
blocks run exactly when the person did not approve: an Approval does not clear them.
incoming: HashMap<&'a str, Vec<&'a str>>§roots: Vec<&'a str>§foreach_of: HashMap<&'a str, &'a FlowNode>A for-each’s body block, to the for-each.
fields: &'a [PayloadField]§outside: HashSet<&'a str>The blocks whose output is outside text.
Implementations§
Source§impl<'a> Flow<'a>
impl<'a> Flow<'a>
fn new(graph: &'a DroneGraph, fields: &'a [PayloadField]) -> Self
Sourcefn reach(&self, start: &[&'a str], stop: bool) -> HashSet<&'a str>
fn reach(&self, start: &[&'a str], stop: bool) -> HashSet<&'a str>
The blocks reached from start (themselves included), without passing through an Approval when stop.
Sourcefn reaches_unapproved(&self, source: Option<&'a str>, at: &str) -> bool
fn reaches_unapproved(&self, source: Option<&'a str>, at: &str) -> bool
Whether text that came in at source (the trigger when none) can reach at with no Approval on some path. A node
the text cannot be placed on a path to counts as reached.
Sourcefn ref_is_outside(&self, path: &str, at: &str) -> bool
fn ref_is_outside(&self, path: &str, at: &str) -> bool
Whether {{path}}, read by the block at, is outside text no Approval has cleared.
fn items_outside(&self, foreach: &FlowNode) -> bool
Sourcefn outside_refs(&self, text: &str, at: &str) -> Vec<String>
fn outside_refs(&self, text: &str, at: &str) -> Vec<String>
The references in text, read by at, that are outside text.
Sourcefn outside_refs_of(&self, node: &FlowNode) -> Vec<String>
fn outside_refs_of(&self, node: &FlowNode) -> Vec<String>
The references anywhere in node that are outside text.
Sourcefn makes_outside_text(&self, node: &FlowNode, kind: BlockKind) -> bool
fn makes_outside_text(&self, node: &FlowNode, kind: BlockKind) -> bool
Whether the output of node is outside text, given what is known so far.
Auto Trait Implementations§
impl<'a> Freeze for Flow<'a>
impl<'a> RefUnwindSafe for Flow<'a>
impl<'a> Send for Flow<'a>
impl<'a> Sync for Flow<'a>
impl<'a> Unpin for Flow<'a>
impl<'a> UnsafeUnpin for Flow<'a>
impl<'a> UnwindSafe for Flow<'a>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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