pub struct UnionCodegen {
pub type_name: Option<String>,
pub derive: Option<Vec<String>>,
pub inline_derive: Option<Vec<String>>,
pub variant_types: Option<bool>,
pub variant_types_suffix: Option<String>,
pub variant_type_derive: Option<Vec<String>>,
}Expand description
Union type-level codegen metadata ($codegen on union schema nodes).
Fields§
§type_name: Option<String>Override generated Rust type name.
derive: Option<Vec<String>>Override derives for this type.
inline_derive: Option<Vec<String>>Override derives for generated inline companion types.
variant_types: Option<bool>Generate dedicated types for variants.
variant_types_suffix: Option<String>Suffix for generated variant types.
variant_type_derive: Option<Vec<String>>Override derives for generated variant_types companion types.
Trait Implementations§
Source§impl Clone for UnionCodegen
impl Clone for UnionCodegen
Source§fn clone(&self) -> UnionCodegen
fn clone(&self) -> UnionCodegen
Returns a duplicate 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 UnionCodegen
impl Debug for UnionCodegen
Source§impl Default for UnionCodegen
impl Default for UnionCodegen
Source§fn default() -> UnionCodegen
fn default() -> UnionCodegen
Returns the “default value” for a type. Read more
Source§impl<'doc> FromEure<'doc> for UnionCodegen
impl<'doc> FromEure<'doc> for UnionCodegen
Source§type Error = ParseError
type Error = ParseError
The error type returned by parsing.
Source§impl IntoEure for UnionCodegen
impl IntoEure for UnionCodegen
Source§type Error = WriteError
type Error = WriteError
The error type returned when writing. Read more
Source§fn write(value: Self, c: &mut DocumentConstructor) -> Result<(), Self::Error>
fn write(value: Self, c: &mut DocumentConstructor) -> Result<(), Self::Error>
Write a value to the current node in the document constructor.
Source§fn write_flatten(
value: Self,
rec: &mut RecordWriter<'_>,
) -> Result<(), Self::Error>
fn write_flatten( value: Self, rec: &mut RecordWriter<'_>, ) -> Result<(), Self::Error>
Write a value as flattened record fields. Read more
Source§impl PartialEq for UnionCodegen
impl PartialEq for UnionCodegen
impl Eq for UnionCodegen
impl StructuralPartialEq for UnionCodegen
Auto Trait Implementations§
impl Freeze for UnionCodegen
impl RefUnwindSafe for UnionCodegen
impl Send for UnionCodegen
impl Sync for UnionCodegen
impl Unpin for UnionCodegen
impl UnsafeUnpin for UnionCodegen
impl UnwindSafe for UnionCodegen
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§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.