pub struct NodeKitFixture {
pub key: String,
pub title: String,
pub description: Option<String>,
pub nodes: Vec<NodeKitFixtureNode>,
pub edges: Vec<NodeKitFixtureEdge>,
pub expected_node_count: Option<usize>,
pub expected_edge_count: Option<usize>,
}Expand description
A reusable fixture graph for a node kit.
Fields§
§key: String§title: String§description: Option<String>§nodes: Vec<NodeKitFixtureNode>§edges: Vec<NodeKitFixtureEdge>§expected_node_count: Option<usize>§expected_edge_count: Option<usize>Implementations§
Source§impl NodeKitFixture
impl NodeKitFixture
pub fn new(key: impl Into<String>, title: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
pub fn node(self, node: NodeKitFixtureNode) -> Self
pub fn edge(self, edge: NodeKitFixtureEdge) -> Self
pub fn expect_counts(self, nodes: usize, edges: usize) -> Self
pub fn build_graph( &self, kit_key: &NodeKitKey, registry: &NodeRegistry, ) -> Result<Graph, NodeKitFixtureError>
Trait Implementations§
Source§impl Clone for NodeKitFixture
impl Clone for NodeKitFixture
Source§fn clone(&self) -> NodeKitFixture
fn clone(&self) -> NodeKitFixture
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 NodeKitFixture
impl Debug for NodeKitFixture
Source§impl<'de> Deserialize<'de> for NodeKitFixture
impl<'de> Deserialize<'de> for NodeKitFixture
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
Source§impl PartialEq for NodeKitFixture
impl PartialEq for NodeKitFixture
Source§fn eq(&self, other: &NodeKitFixture) -> bool
fn eq(&self, other: &NodeKitFixture) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NodeKitFixture
impl Serialize for NodeKitFixture
impl StructuralPartialEq for NodeKitFixture
Auto Trait Implementations§
impl Freeze for NodeKitFixture
impl RefUnwindSafe for NodeKitFixture
impl Send for NodeKitFixture
impl Sync for NodeKitFixture
impl Unpin for NodeKitFixture
impl UnsafeUnpin for NodeKitFixture
impl UnwindSafe for NodeKitFixture
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