#[non_exhaustive]pub struct FieldGraphSpec {
pub nodes: HashMap<FieldId, NodeSpec>,
pub semantics: HashMap<FieldId, FieldSemantics>,
}Expand description
A specification of a field graph, including nodes and their semantics.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.nodes: HashMap<FieldId, NodeSpec>Node definitions keyed by field id.
semantics: HashMap<FieldId, FieldSemantics>Semantic tags for fields (gate or probability).
Implementations§
Source§impl FieldGraphSpec
impl FieldGraphSpec
Sourcepub fn add(&mut self, id: &str, spec: NodeSpec) -> &mut Self
pub fn add(&mut self, id: &str, spec: NodeSpec) -> &mut Self
Add a node to the field graph specification.
Sourcepub fn set_semantics(
&mut self,
id: &str,
semantics: FieldSemantics,
) -> &mut Self
pub fn set_semantics( &mut self, id: &str, semantics: FieldSemantics, ) -> &mut Self
Set the semantics for a node in the field graph specification.
Sourcepub fn add_with_semantics(
&mut self,
id: &str,
spec: NodeSpec,
semantics: FieldSemantics,
) -> &mut Self
pub fn add_with_semantics( &mut self, id: &str, spec: NodeSpec, semantics: FieldSemantics, ) -> &mut Self
Add a node with semantics to the field graph specification.
Trait Implementations§
Source§impl Clone for FieldGraphSpec
impl Clone for FieldGraphSpec
Source§impl Debug for FieldGraphSpec
impl Debug for FieldGraphSpec
Auto Trait Implementations§
impl Forget for FieldGraphSpec
impl Freeze for FieldGraphSpec
impl RefUnwindSafe for FieldGraphSpec
impl Send for FieldGraphSpec
impl Sync for FieldGraphSpec
impl Unpin for FieldGraphSpec
impl UnsafeUnpin for FieldGraphSpec
impl UnwindSafe for FieldGraphSpec
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