Skip to main content

RenderStep

Enum RenderStep 

Source
pub enum RenderStep {
    Types,
    TypesSerdeXmlRs {
        version: SerdeXmlRsVersion,
    },
    TypesSerdeQuickXml,
    Defaults,
    NamespaceConstants,
    EnumConstants,
    PrefixConstants,
    WithNamespaceTrait,
    QuickXmlSerialize {
        namespaces: NamespaceSerialization,
        default_namespace: Option<Namespace>,
    },
    QuickXmlDeserialize {
        boxed_deserializer: bool,
    },
}
Expand description

Configuration for the RenderStepss the Renderer should use for rendering the code.

*Caution* Some render steps are incompatible to each other (e.g. only one `TypesXXX` step should be used, because they render the general type structure). While other render steps depend on each other (e.g. `QuickXmlXXX` depends on `Types` and `NamespaceConstants`).

Variants§

§

Types

Step to render the pure types.

§

TypesSerdeXmlRs

Step to render the types with serde-xml-rs support.

Fields

§version: SerdeXmlRsVersion

Version of serde-xml-rs to render the code for.

§

TypesSerdeQuickXml

Step to render the types with quick_xml serde support.

§

Defaults

Renderer to render associated methods that return the default values of the different fields of a struct.

§

NamespaceConstants

Renderer to add constants for the namespaces to the generated code.

§

EnumConstants

Renderer to add constants for each variant of an enumeration using its simple base type.

§

PrefixConstants

Renderer to add constants for the namespace prefixes to the generated code.

§

WithNamespaceTrait

Renderer that adds the WithNamespace trait to the generated types.

§

QuickXmlSerialize

Renderer that renders code for the quick_xml serializer of the different types.

Fields

§namespaces: NamespaceSerialization

Whether to add namespaces to the root element during serialization or not.

§default_namespace: Option<Namespace>

Default namespace to use for the serialization.

§

QuickXmlDeserialize

Renderer that renders code for the quick_xml deserializer of the different types.

Fields

§boxed_deserializer: bool

Whether to box the deserializer or not.

For more details have a look at QuickXmlDeserializeRenderer::boxed_deserializer.

Implementations§

Source§

impl RenderStep

Source

pub fn is_same(&self, other: &Self) -> bool

Return true if the passed value identifies the same step, false otherwise.

Trait Implementations§

Source§

impl Clone for RenderStep

Source§

fn clone(&self) -> RenderStep

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RenderStep

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl RenderStepConfig for RenderStep

Source§

fn render_step_type(&self) -> RenderStepType

Returns the type of this render step.
Source§

fn boxed_clone(&self) -> Box<dyn RenderStepConfig>

Returns a boxed clone of the current object.
Source§

fn into_render_step(self: Box<Self>) -> Box<dyn RenderStepTrait>

Creates the actual render step and returned it as a box.
Source§

fn is_mutual_exclusive_to(&self, other: &dyn RenderStepConfig) -> bool

Returns true if self is mutual exclusive to other, false otherwise.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<X> AsAny for X
where X: 'static,

Source§

fn into_any(self: Box<X>) -> Box<dyn Any>

Convert the boxed object into a boxed any.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Get a reference to the current object as Any.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Get a mutable reference to the current object as Any.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,