pub struct StructValue {
pub type_name: Rc<str>,
pub fields: Vec<(Rc<str>, Value)>,
pub opaque: bool,
}Fields§
§type_name: Rc<str>Fully qualified type name, such as values.BookingDraft.
fields: Vec<(Rc<str>, Value)>Fields in declaration order.
opaque: boolWhether the type was declared export opaque struct, in which case
the value renders as its name alone (ADR 0014).
The flag rides on the value because rendering is context-free: a
Display has no idea which module is watching, and a value formatted
in the module that declares it can be handed to one that may not name
its fields. So the representation is hidden from every reader,
including the declaring module, which publishes a readable form by
exporting a method that builds one.
Implementations§
Trait Implementations§
Source§impl Clone for StructValue
impl Clone for StructValue
Source§fn clone(&self) -> StructValue
fn clone(&self) -> StructValue
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for StructValue
impl !Send for StructValue
impl !Sync for StructValue
impl !UnwindSafe for StructValue
impl Freeze for StructValue
impl Unpin for StructValue
impl UnsafeUnpin for StructValue
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