pub struct CustomMeta { /* private fields */ }
Expand description
Type information for a custom defined type.
Implementations§
Source§impl CustomMeta
impl CustomMeta
Sourcepub fn new(name: &'static str) -> Self
pub fn new(name: &'static str) -> Self
Create a new custom type information with the passed name
.
Sourcepub fn include_from(self, s: &'static str) -> Self
pub fn include_from(self, s: &'static str) -> 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.
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.