pub struct ConnectPlan {
pub decision: ConnectDecision,
pub diagnostics: Vec<Diagnostic>,
pub ops: Vec<GraphOp>,
}Expand description
A rules-driven plan for connecting two ports.
Fields§
§decision: ConnectDecisionDecision.
diagnostics: Vec<Diagnostic>Diagnostics explaining the decision.
ops: Vec<GraphOp>Optional edits to apply if accepted (disconnect existing edges, insert conversion nodes, etc.).
Implementations§
Source§impl ConnectPlan
impl ConnectPlan
pub fn is_accept(&self) -> bool
pub fn is_reject(&self) -> bool
pub fn diagnostics(&self) -> &[Diagnostic]
pub fn ops(&self) -> &[GraphOp]
pub fn into_ops(self) -> Vec<GraphOp>
Sourcepub fn from_ops(ops: impl IntoIterator<Item = GraphOp>) -> Self
pub fn from_ops(ops: impl IntoIterator<Item = GraphOp>) -> Self
Creates an accepted plan with planned connection ops.
Sourcepub fn reject(message: impl Into<String>) -> Self
pub fn reject(message: impl Into<String>) -> Self
Creates a rejected plan with a single error diagnostic.
pub fn reject_with_diagnostic(diagnostic: Diagnostic) -> Self
pub fn reject_with_diagnostics(diagnostics: Vec<Diagnostic>) -> Self
Trait Implementations§
Source§impl Clone for ConnectPlan
impl Clone for ConnectPlan
Source§fn clone(&self) -> ConnectPlan
fn clone(&self) -> ConnectPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ConnectPlan
impl Debug for ConnectPlan
Source§impl<'de> Deserialize<'de> for ConnectPlan
impl<'de> Deserialize<'de> for ConnectPlan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConnectPlan
impl RefUnwindSafe for ConnectPlan
impl Send for ConnectPlan
impl Sync for ConnectPlan
impl Unpin for ConnectPlan
impl UnsafeUnpin for ConnectPlan
impl UnwindSafe for ConnectPlan
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