pub struct LayoutMetaData {
pub id: String,
pub name: String,
}
Expand description
Structure for sending metadata about Layout
. This includes id, and name,
but excludes all actual nodes.
Some fields of LayoutData
are simplified compared to Layout
(e.g., pure Strings
instead
of more complex typesafe structs) to allow for easier (de)serialization.
Fields§
§id: String
§name: String
Implementations§
source§impl LayoutMetaData
impl LayoutMetaData
sourcepub fn new(layout_id: &str, layout_name: &str) -> LayoutMetaData
pub fn new(layout_id: &str, layout_name: &str) -> LayoutMetaData
Create new LayoutMetaData
instance given a layout’s name and id string slices.
sourcepub fn from_layout(layout_id: &LayoutId, layout: &Layout) -> LayoutMetaData
pub fn from_layout(layout_id: &LayoutId, layout: &Layout) -> LayoutMetaData
Create new LayoutMetaData
instance given a layout
and its id.
Trait Implementations§
source§impl Clone for LayoutMetaData
impl Clone for LayoutMetaData
source§fn clone(&self) -> LayoutMetaData
fn clone(&self) -> LayoutMetaData
Returns a copy 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 LayoutMetaData
impl Debug for LayoutMetaData
source§impl<'de> Deserialize<'de> for LayoutMetaData
impl<'de> Deserialize<'de> for LayoutMetaData
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<'de> JsonSerde<'de> for LayoutMetaData
impl<'de> JsonSerde<'de> for LayoutMetaData
source§fn to_json_str(&self) -> String
fn to_json_str(&self) -> String
Wrapper for json serialization.
source§fn to_pretty_json_str(&self) -> String
fn to_pretty_json_str(&self) -> String
Wrapper for pretty json serialization with indentation.
source§impl PartialEq for LayoutMetaData
impl PartialEq for LayoutMetaData
source§impl Serialize for LayoutMetaData
impl Serialize for LayoutMetaData
impl StructuralPartialEq for LayoutMetaData
Auto Trait Implementations§
impl Freeze for LayoutMetaData
impl RefUnwindSafe for LayoutMetaData
impl Send for LayoutMetaData
impl Sync for LayoutMetaData
impl Unpin for LayoutMetaData
impl UnwindSafe for LayoutMetaData
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)