pub struct XmlBuilder<S: State = Empty> { /* private fields */ }
Expand description
Use builder syntax to set the inputs and finish with build()
.
Implementations§
Source§impl<S: State> XmlBuilder<S>
impl<S: State> XmlBuilder<S>
Sourcepub fn name(self, value: impl Into<Cow<'static, str>>) -> XmlBuilder<SetName<S>>where
S::Name: IsUnset,
pub fn name(self, value: impl Into<Cow<'static, str>>) -> XmlBuilder<SetName<S>>where
S::Name: IsUnset,
Optional (Some / Option setters).
Used to replace the name of attribute or type used in schema property.
When used with Xml::wrapped
attribute the name will be used as a wrapper name
for wrapped array instead of the item or type name.
Sourcepub fn maybe_name(
self,
value: Option<impl Into<Cow<'static, str>>>,
) -> XmlBuilder<SetName<S>>where
S::Name: IsUnset,
pub fn maybe_name(
self,
value: Option<impl Into<Cow<'static, str>>>,
) -> XmlBuilder<SetName<S>>where
S::Name: IsUnset,
Optional (Some / Option setters).
Used to replace the name of attribute or type used in schema property.
When used with Xml::wrapped
attribute the name will be used as a wrapper name
for wrapped array instead of the item or type name.
Sourcepub fn namespace(
self,
value: impl Into<Cow<'static, str>>,
) -> XmlBuilder<SetNamespace<S>>where
S::Namespace: IsUnset,
pub fn namespace(
self,
value: impl Into<Cow<'static, str>>,
) -> XmlBuilder<SetNamespace<S>>where
S::Namespace: IsUnset,
Sourcepub fn maybe_namespace(
self,
value: Option<impl Into<Cow<'static, str>>>,
) -> XmlBuilder<SetNamespace<S>>where
S::Namespace: IsUnset,
pub fn maybe_namespace(
self,
value: Option<impl Into<Cow<'static, str>>>,
) -> XmlBuilder<SetNamespace<S>>where
S::Namespace: IsUnset,
Sourcepub fn prefix(
self,
value: impl Into<Cow<'static, str>>,
) -> XmlBuilder<SetPrefix<S>>where
S::Prefix: IsUnset,
pub fn prefix(
self,
value: impl Into<Cow<'static, str>>,
) -> XmlBuilder<SetPrefix<S>>where
S::Prefix: IsUnset,
Sourcepub fn maybe_prefix(
self,
value: Option<impl Into<Cow<'static, str>>>,
) -> XmlBuilder<SetPrefix<S>>where
S::Prefix: IsUnset,
pub fn maybe_prefix(
self,
value: Option<impl Into<Cow<'static, str>>>,
) -> XmlBuilder<SetPrefix<S>>where
S::Prefix: IsUnset,
Sourcepub fn attribute(self, value: impl Into<bool>) -> XmlBuilder<SetAttribute<S>>where
S::Attribute: IsUnset,
pub fn attribute(self, value: impl Into<bool>) -> XmlBuilder<SetAttribute<S>>where
S::Attribute: IsUnset,
Sourcepub fn maybe_attribute(
self,
value: Option<impl Into<bool>>,
) -> XmlBuilder<SetAttribute<S>>where
S::Attribute: IsUnset,
pub fn maybe_attribute(
self,
value: Option<impl Into<bool>>,
) -> XmlBuilder<SetAttribute<S>>where
S::Attribute: IsUnset,
Sourcepub fn wrapped(self, value: impl Into<bool>) -> XmlBuilder<SetWrapped<S>>where
S::Wrapped: IsUnset,
pub fn wrapped(self, value: impl Into<bool>) -> XmlBuilder<SetWrapped<S>>where
S::Wrapped: IsUnset,
Sourcepub fn maybe_wrapped(
self,
value: Option<impl Into<bool>>,
) -> XmlBuilder<SetWrapped<S>>where
S::Wrapped: IsUnset,
pub fn maybe_wrapped(
self,
value: Option<impl Into<bool>>,
) -> XmlBuilder<SetWrapped<S>>where
S::Wrapped: IsUnset,
Auto Trait Implementations§
impl<S> Freeze for XmlBuilder<S>
impl<S> RefUnwindSafe for XmlBuilder<S>
impl<S> Send for XmlBuilder<S>
impl<S> Sync for XmlBuilder<S>
impl<S> Unpin for XmlBuilder<S>
impl<S> UnwindSafe for XmlBuilder<S>
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