Skip to main content

impl_defaultable

Macro impl_defaultable 

Source
macro_rules! impl_defaultable {
    (<$($generic_name:ident$(: $generic_constraint:path)?)*> for $t:ty, $self:ident, $($check:tt)*) => { ... };
    ($t:ty) => { ... };
    ($t:ty, $self:ident, $($check:tt)*) => { ... };
}
Expand description

Automatically implements Defaultable on the given type, allowing it to be supported by #[codec(optional)] fields.