pub struct CustomType { /* private fields */ }Expand description
Type information for a custom defined type.
Implementations§
Source§impl CustomType
impl CustomType
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 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 CustomType
impl Clone for CustomType
Source§impl Debug for CustomType
impl Debug for CustomType
Source§impl Hash for CustomType
impl Hash for CustomType
Source§impl PartialEq for CustomType
impl PartialEq for CustomType
impl Eq for CustomType
Auto Trait Implementations§
impl Freeze for CustomType
impl !RefUnwindSafe for CustomType
impl !Send for CustomType
impl !Sync for CustomType
impl Unpin for CustomType
impl !UnwindSafe for CustomType
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