pub trait CustomDefaultImpl:
Send
+ Sync
+ 'static {
// Required methods
fn exec(&self, s: &str) -> Option<TokenStream>;
fn clone(&self) -> Box<dyn CustomDefaultImpl>;
}
Expand description
Trait that converts the default value of a element specified in the XML schema to actual default code.
You can add a custom default implementation to your custom type using
CustomMeta::with_default
.
Required Methods§
Sourcefn exec(&self, s: &str) -> Option<TokenStream>
fn exec(&self, s: &str) -> Option<TokenStream>
Try to convert the passed string s
that contains the default value from
the XML schema to actual default code. If the value could not be converted
to code None
is returned.
Sourcefn clone(&self) -> Box<dyn CustomDefaultImpl>
fn clone(&self) -> Box<dyn CustomDefaultImpl>
Clone this instance and return it as a box.