Struct lightning::util::ser::RequiredWrapper
source · pub struct RequiredWrapper<T>(pub Option<T>);
Expand description
Wrapper to read a required (non-optional) TLV record.
(C-not exported) as manual TLV building is not currently supported in bindings
Tuple Fields§
§0: Option<T>
Trait Implementations§
source§impl<T> From<T> for RequiredWrapper<T>
impl<T> From<T> for RequiredWrapper<T>
When handling default_values
, we want to map the default-value T directly
to a RequiredWrapper<T>
in a way that works for field: T = t;
as
well. Thus, we assume Into<T> for T
does nothing and use that.
source§fn from(t: T) -> RequiredWrapper<T>
fn from(t: T) -> RequiredWrapper<T>
Converts to this type from the input type.