pub struct IntentNode {
pub intent: Intent,
pub contexts: Vec<Context>,
pub attributes: HashMap<String, String>,
}Expand description
携带约束的意图原子
Fields§
§intent: Intent§contexts: Vec<Context>§attributes: HashMap<String, String>属性集 (Attributes),用于存储变量名、常量值等元数据
Implementations§
Source§impl IntentNode
impl IntentNode
pub fn new(intent: Intent) -> Self
pub fn with_context(self, context: Context) -> Self
pub fn with_attribute(self, key: &str, value: &str) -> Self
Trait Implementations§
Source§impl Clone for IntentNode
impl Clone for IntentNode
Source§fn clone(&self) -> IntentNode
fn clone(&self) -> IntentNode
Returns a duplicate of the value. Read more
1.0.0 · 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 IntentNode
impl Debug for IntentNode
Source§impl<'de> Deserialize<'de> for IntentNode
impl<'de> Deserialize<'de> for IntentNode
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 IntentNode
impl PartialEq for IntentNode
Source§impl Serialize for IntentNode
impl Serialize for IntentNode
impl Eq for IntentNode
impl StructuralPartialEq for IntentNode
Auto Trait Implementations§
impl Freeze for IntentNode
impl RefUnwindSafe for IntentNode
impl Send for IntentNode
impl Sync for IntentNode
impl Unpin for IntentNode
impl UnsafeUnpin for IntentNode
impl UnwindSafe for IntentNode
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