pub struct CustomMeta { /* private fields */ }Expand description
Type information for a custom defined type.
Implementations§
Source§impl CustomMeta
impl CustomMeta
Sourcepub fn include_from<X>(self, include: X) -> Self
pub fn include_from<X>(self, include: X) -> Self
The the path the type should be included from.
The path should be absolute, or relative to the root of the generated code.
Sourcepub fn default(&self, s: &str) -> Option<TokenStream>
pub fn default(&self, s: &str) -> Option<TokenStream>
Try to get the default value (as code) for the given string.
This is used to translate default values specified in the XSD schema, to suitable rust code.
Sourcepub fn with_default<X: CustomDefaultImpl>(self, x: X) -> Self
pub fn with_default<X: CustomDefaultImpl>(self, x: X) -> Self
Set the handler for the default values for this custom defined type.
Sourcepub fn allow_any(&self) -> bool
pub fn allow_any(&self) -> bool
Returns true if this type contains xs:any elements, false otherwise.
Sourcepub fn with_allow_any(self, value: bool) -> Self
pub fn with_allow_any(self, value: bool) -> Self
Set wether this custom type containsxs:any elements or not.
Trait Implementations§
Source§impl Clone for CustomMeta
impl Clone for CustomMeta
Source§impl Debug for CustomMeta
impl Debug for CustomMeta
Source§impl From<CustomMeta> for MetaType
impl From<CustomMeta> for MetaType
Source§fn from(value: CustomMeta) -> Self
fn from(value: CustomMeta) -> Self
Converts to this type from the input type.
Source§impl Hash for CustomMeta
impl Hash for CustomMeta
Source§impl PartialEq for CustomMeta
impl PartialEq for CustomMeta
impl Eq for CustomMeta
Auto Trait Implementations§
impl Freeze for CustomMeta
impl !RefUnwindSafe for CustomMeta
impl Send for CustomMeta
impl Sync for CustomMeta
impl Unpin for CustomMeta
impl !UnwindSafe for CustomMeta
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.