pub struct MindMapData {
pub node_data: Node,
pub direction: LayoutDirection,
pub compact: bool,
pub meta: Option<Value>,
}Expand description
Nested persistent document. Runtime selection, viewports and history are excluded.
Fields§
§node_data: NodeRoot of the document.
direction: LayoutDirectionLayout with upstream numeric encoding.
compact: boolCompact spacing (still overridable by host CSS variables).
meta: Option<Value>Opaque document metadata, including explicit null.
Implementations§
Source§impl MindMapData
impl MindMapData
Sourcepub fn validate(&self) -> Result<(), MindMapError>
pub fn validate(&self) -> Result<(), MindMapError>
Reject empty/duplicate IDs and trees deeper than 128 levels.
Sourcepub fn from_json(json: &str) -> Result<Self, MindMapError>
pub fn from_json(json: &str) -> Result<Self, MindMapError>
Strict JSON import. Unknown fields (including rich content) are errors.
Sourcepub fn to_json(&self) -> Result<String, MindMapError>
pub fn to_json(&self) -> Result<String, MindMapError>
Validate and export all supported persistent fields.
Trait Implementations§
Source§impl Clone for MindMapData
impl Clone for MindMapData
Source§impl Debug for MindMapData
impl Debug for MindMapData
Source§impl<'de> Deserialize<'de> for MindMapData
impl<'de> Deserialize<'de> for MindMapData
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
impl Eq for MindMapData
Source§impl PartialEq for MindMapData
impl PartialEq for MindMapData
Source§impl Serialize for MindMapData
impl Serialize for MindMapData
impl StructuralPartialEq for MindMapData
Auto Trait Implementations§
impl Forget for MindMapData
impl Freeze for MindMapData
impl Move for MindMapData
impl RefUnwindSafe for MindMapData
impl Send for MindMapData
impl Sync for MindMapData
impl Unpin for MindMapData
impl UnsafeUnpin for MindMapData
impl UnwindSafe for MindMapData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.