pub struct MovementUpdate { /* private fields */ }Expand description
A struct to allow easy updating of a Movement. Each field can be set individually; however, methods are available to allow construction of an update in a more expressive/declarative way.
Each Option field that is set to None will be ignored. The default behavior of each field is
to merge existing values with the new ones unless a field is explicitly set to
[UpdateMethod::Replace] or a method indicates otherwise. Duplicate VtxoId values will be
ignored.
See [UpdateMethod] to understand how to control how the MovementUpdate is applied.
Implementations§
Source§impl MovementUpdate
impl MovementUpdate
pub fn new() -> Self
pub fn consumed_vtxo(self, vtxo: impl VtxoRef) -> Self
pub fn consumed_vtxo_if_some(self, vtxo: Option<impl VtxoRef>) -> Self
pub fn consumed_vtxos( self, vtxos: impl IntoIterator<Item = impl VtxoRef>, ) -> Self
pub fn effective_balance(self, effective: SignedAmount) -> Self
pub fn exited_vtxo(self, vtxo: impl VtxoRef) -> Self
pub fn exited_vtxo_if_some(self, vtxo: Option<impl VtxoRef>) -> Self
pub fn exited_vtxos(self, vtxos: impl IntoIterator<Item = impl VtxoRef>) -> Self
pub fn fee(self, offchain_fee: Amount) -> Self
pub fn intended_balance(self, intended: SignedAmount) -> Self
pub fn intended_and_effective_balance(self, balance: SignedAmount) -> Self
pub fn metadata( self, metadata: impl IntoIterator<Item = (String, Value)>, ) -> Self
pub fn produced_vtxo(self, vtxo: impl VtxoRef) -> Self
pub fn produced_vtxo_if_some(self, vtxo: Option<impl VtxoRef>) -> Self
pub fn produced_vtxos( self, vtxos: impl IntoIterator<Item = impl VtxoRef>, ) -> Self
pub fn received_on( self, received: impl IntoIterator<Item = MovementDestination>, ) -> Self
pub fn sent_to( self, destinations: impl IntoIterator<Item = MovementDestination>, ) -> Self
pub fn replace_consumed_vtxos( self, vtxos: impl IntoIterator<Item = impl VtxoRef>, ) -> Self
pub fn replace_exited_vtxos( self, vtxos: impl IntoIterator<Item = impl VtxoRef>, ) -> Self
pub fn replace_metadata( self, metadata: impl IntoIterator<Item = (String, Value)>, ) -> Self
pub fn replace_produced_vtxos( self, vtxos: impl IntoIterator<Item = impl VtxoRef>, ) -> Self
pub fn replace_received_on( self, received: impl IntoIterator<Item = MovementDestination>, ) -> Self
pub fn replace_sent_on( self, destinations: impl IntoIterator<Item = MovementDestination>, ) -> Self
pub fn apply_to(self, movement: &mut Movement, at: DateTime<Local>)
Trait Implementations§
Source§impl Clone for MovementUpdate
impl Clone for MovementUpdate
Source§fn clone(&self) -> MovementUpdate
fn clone(&self) -> MovementUpdate
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for MovementUpdate
impl RefUnwindSafe for MovementUpdate
impl Send for MovementUpdate
impl Sync for MovementUpdate
impl Unpin for MovementUpdate
impl UnwindSafe for MovementUpdate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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