Struct breez_sdk_liquid::lightning_invoice::ExpiryTime
pub struct ExpiryTime(/* private fields */);
Expand description
Positive duration that defines when (relatively to the timestamp) in the future the invoice expires
Implementations§
§impl ExpiryTime
impl ExpiryTime
pub fn from_seconds(seconds: u64) -> ExpiryTime
pub fn from_seconds(seconds: u64) -> ExpiryTime
Construct an ExpiryTime
from seconds.
pub fn from_duration(duration: Duration) -> ExpiryTime
pub fn from_duration(duration: Duration) -> ExpiryTime
Construct an ExpiryTime
from a Duration
, dropping the sub-second part.
pub fn as_seconds(&self) -> u64
pub fn as_seconds(&self) -> u64
Returns the expiry time in seconds
pub fn as_duration(&self) -> &Duration
pub fn as_duration(&self) -> &Duration
Returns a reference to the underlying Duration
(=expiry time)
Trait Implementations§
§impl Base32Len for ExpiryTime
impl Base32Len for ExpiryTime
§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
§impl Clone for ExpiryTime
impl Clone for ExpiryTime
§fn clone(&self) -> ExpiryTime
fn clone(&self) -> ExpiryTime
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for ExpiryTime
impl Debug for ExpiryTime
§impl FromBase32 for ExpiryTime
impl FromBase32 for ExpiryTime
§type Err = Bolt11ParseError
type Err = Bolt11ParseError
The associated error which can be returned from parsing (e.g. because of bad padding).
§fn from_base32(field_data: &[u5]) -> Result<ExpiryTime, Bolt11ParseError>
fn from_base32(field_data: &[u5]) -> Result<ExpiryTime, Bolt11ParseError>
Convert a base32 slice to
Self
.§impl Hash for ExpiryTime
impl Hash for ExpiryTime
§impl Ord for ExpiryTime
impl Ord for ExpiryTime
§impl PartialEq for ExpiryTime
impl PartialEq for ExpiryTime
§impl PartialOrd for ExpiryTime
impl PartialOrd for ExpiryTime
§impl ToBase32 for ExpiryTime
impl ToBase32 for ExpiryTime
§fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
Encode as base32 and write it to the supplied writer
Implementations shouldn’t allocate.
impl Eq for ExpiryTime
impl StructuralPartialEq for ExpiryTime
Auto Trait Implementations§
impl Freeze for ExpiryTime
impl RefUnwindSafe for ExpiryTime
impl Send for ExpiryTime
impl Sync for ExpiryTime
impl Unpin for ExpiryTime
impl UnwindSafe for ExpiryTime
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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