pub struct ReservedCoin {
pub coin_id: String,
pub reservation_id: String,
pub expires_at_unix: u64,
}Expand description
One coin held by a live reservation, and when that hold lapses.
The expiry travels WITH the coin rather than being summarised once, because a client’s honest sentence is per-coin: “this coin is committed until 14:32”. A single soonest-expiry figure would be right about the set and wrong about every coin in it but one.
Fields§
§coin_id: StringThe held coin id, lowercase 64-hex and unprefixed.
reservation_id: StringThe reservation holding it — the handle
release takes. OPAQUE; never parsed.
expires_at_unix: u64Unix seconds after which this hold no longer applies, whether or not anyone releases it.
Always present. A hold with no expiry is a permanent funds lockout, so the contract has no way to express one.
Trait Implementations§
Source§impl Clone for ReservedCoin
impl Clone for ReservedCoin
Source§fn clone(&self) -> ReservedCoin
fn clone(&self) -> ReservedCoin
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReservedCoin
impl Debug for ReservedCoin
Source§impl<'de> Deserialize<'de> for ReservedCoin
impl<'de> Deserialize<'de> for ReservedCoin
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ReservedCoin
Source§impl PartialEq for ReservedCoin
impl PartialEq for ReservedCoin
Source§impl Serialize for ReservedCoin
impl Serialize for ReservedCoin
impl StructuralPartialEq for ReservedCoin
Auto Trait Implementations§
impl Freeze for ReservedCoin
impl RefUnwindSafe for ReservedCoin
impl Send for ReservedCoin
impl Sync for ReservedCoin
impl Unpin for ReservedCoin
impl UnsafeUnpin for ReservedCoin
impl UnwindSafe for ReservedCoin
Blanket Implementations§
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