pub enum KmapAction {
CreateNode {
title: String,
navigation_hint: String,
narrative: String,
connections: Vec<ConnectionSpec>,
},
UpdateNode {
node_id: NodeId,
title: Option<String>,
navigation_hint: Option<String>,
narrative: Option<String>,
connection_updates: Vec<ConnectionSpec>,
},
ApplyMeasurements {
measurements: Vec<ConnectionMeasurement>,
},
}Variants§
CreateNode
UpdateNode
ApplyMeasurements
Fields
§
measurements: Vec<ConnectionMeasurement>Implementations§
Source§impl KmapAction
impl KmapAction
pub fn create_node( title: impl Into<String>, navigation_hint: impl Into<String>, narrative: impl Into<String>, connections: Vec<ConnectionSpec>, ) -> Result<Self>
pub fn update_node( node_id: NodeId, title: Option<String>, navigation_hint: Option<String>, narrative: Option<String>, connection_updates: Vec<ConnectionSpec>, ) -> Result<Self>
pub fn apply_measurements( measurements: Vec<ConnectionMeasurement>, ) -> Result<Self>
pub fn validate(&self) -> Result<()>
pub fn encode(&self) -> Result<Vec<u8>>
pub fn decode(bytes: &[u8]) -> Result<Self>
Trait Implementations§
Source§impl Clone for KmapAction
impl Clone for KmapAction
Source§fn clone(&self) -> KmapAction
fn clone(&self) -> KmapAction
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 KmapAction
impl Debug for KmapAction
Source§impl<'de> Deserialize<'de> for KmapAction
impl<'de> Deserialize<'de> for KmapAction
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 KmapAction
impl PartialEq for KmapAction
Source§impl Serialize for KmapAction
impl Serialize for KmapAction
impl StructuralPartialEq for KmapAction
Auto Trait Implementations§
impl Freeze for KmapAction
impl RefUnwindSafe for KmapAction
impl Send for KmapAction
impl Sync for KmapAction
impl Unpin for KmapAction
impl UnsafeUnpin for KmapAction
impl UnwindSafe for KmapAction
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