pub struct Constructors {
pub record: fn(&str, &[(String, String)]) -> String,
pub variant: fn(&str, &str, Option<&str>) -> String,
pub plain: fn(&Value) -> String,
}Expand description
How one language writes the parts a value is made of.
Only the pieces that differ. What a float or a string looks like is already each backend’s untyped literal writer; what differs once a type is known is how a struct is built and how a variant is named.
Fields§
§record: fn(&str, &[(String, String)]) -> StringBuilds a named struct from name and its field = value parts.
variant: fn(&str, &str, Option<&str>) -> StringBuilds one alternative of a named enum.
plain: fn(&Value) -> StringWrites a value with no type to guide it.
Auto Trait Implementations§
impl Freeze for Constructors
impl RefUnwindSafe for Constructors
impl Send for Constructors
impl Sync for Constructors
impl Unpin for Constructors
impl UnsafeUnpin for Constructors
impl UnwindSafe for Constructors
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