Struct breez_sdk_liquid::lightning::util::ser::RequiredWrapper
pub struct RequiredWrapper<T>(pub Option<T>);
Expand description
Wrapper to read a required (non-optional) TLV record.
This is not exported to bindings users as manual TLV building is not currently supported in bindings
Tuple Fields§
§0: Option<T>
Trait Implementations§
§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.
§fn from(t: T) -> RequiredWrapper<T>
fn from(t: T) -> RequiredWrapper<T>
Converts to this type from the input type.
§impl<T> Readable for RequiredWrapper<T>where
T: Readable,
impl<T> Readable for RequiredWrapper<T>where
T: Readable,
§fn read<R>(reader: &mut R) -> Result<RequiredWrapper<T>, DecodeError>where
R: Read,
fn read<R>(reader: &mut R) -> Result<RequiredWrapper<T>, DecodeError>where
R: Read,
Reads a
Self
in from the given Read
.§impl<A, T> ReadableArgs<A> for RequiredWrapper<T>where
T: ReadableArgs<A>,
impl<A, T> ReadableArgs<A> for RequiredWrapper<T>where
T: ReadableArgs<A>,
§fn read<R>(reader: &mut R, args: A) -> Result<RequiredWrapper<T>, DecodeError>where
R: Read,
fn read<R>(reader: &mut R, args: A) -> Result<RequiredWrapper<T>, DecodeError>where
R: Read,
Reads a
Self
in from the given Read
.Auto Trait Implementations§
impl<T> Freeze for RequiredWrapper<T>where
T: Freeze,
impl<T> RefUnwindSafe for RequiredWrapper<T>where
T: RefUnwindSafe,
impl<T> Send for RequiredWrapper<T>where
T: Send,
impl<T> Sync for RequiredWrapper<T>where
T: Sync,
impl<T> Unpin for RequiredWrapper<T>where
T: Unpin,
impl<T> UnwindSafe for RequiredWrapper<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request