pub struct TimeBounds { /* private fields */ }Expand description
The time window in which a transaction is considered valid.
Implementations§
Source§impl TimeBounds
impl TimeBounds
Sourcepub fn valid_for(duration: Duration) -> TimeBounds
pub fn valid_for(duration: Duration) -> TimeBounds
Returns time bounds with the upper bounds set to duration in the future.
Sourcepub fn always_valid() -> TimeBounds
pub fn always_valid() -> TimeBounds
Returns time bounds such that the transaction is always valid.
Sourcepub fn with_lower(&self, lower: DateTime<Utc>) -> Result<TimeBounds>
pub fn with_lower(&self, lower: DateTime<Utc>) -> Result<TimeBounds>
Makes a new time bounds with the lower bound changed.
Sourcepub fn with_upper(&self, upper: DateTime<Utc>) -> Result<TimeBounds>
pub fn with_upper(&self, upper: DateTime<Utc>) -> Result<TimeBounds>
Makes a new time bounds with the upper bound changed.
Sourcepub fn lower_mut(&mut self) -> &mut Option<DateTime<Utc>>
pub fn lower_mut(&mut self) -> &mut Option<DateTime<Utc>>
Retrieves a mutable reference to the time bounds lower bound.
Sourcepub fn upper_mut(&mut self) -> &mut Option<DateTime<Utc>>
pub fn upper_mut(&mut self) -> &mut Option<DateTime<Utc>>
Retrieves a mutable reference to the time bounds lower bound.
Sourcepub fn to_xdr(&self) -> Result<TimeBounds>
pub fn to_xdr(&self) -> Result<TimeBounds>
Returns the xdr object.
Sourcepub fn from_xdr(x: &TimeBounds) -> Result<TimeBounds>
pub fn from_xdr(x: &TimeBounds) -> Result<TimeBounds>
Creates from the xdr object.
Trait Implementations§
Source§impl Clone for TimeBounds
impl Clone for TimeBounds
Source§fn clone(&self) -> TimeBounds
fn clone(&self) -> TimeBounds
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 moreSource§impl Debug for TimeBounds
impl Debug for TimeBounds
Source§impl PartialEq for TimeBounds
impl PartialEq for TimeBounds
Source§impl ReadXdr for TimeBounds
impl ReadXdr for TimeBounds
Source§fn read_xdr<R: Read>(r: &mut Limited<R>) -> Result<Self>
fn read_xdr<R: Read>(r: &mut Limited<R>) -> Result<Self>
Read the XDR and construct the type. Read more
Source§fn read_xdr_to_end<R>(r: &mut Limited<R>) -> Result<Self, Error>where
R: Read,
fn read_xdr_to_end<R>(r: &mut Limited<R>) -> Result<Self, Error>where
R: Read,
Read the XDR and construct the type, and consider it an error if the
read does not completely consume the read implementation. Read more
Source§fn read_xdr_into<R>(&mut self, r: &mut Limited<R>) -> Result<(), Error>where
R: Read,
fn read_xdr_into<R>(&mut self, r: &mut Limited<R>) -> Result<(), Error>where
R: Read,
Read the XDR and construct the type. Read more
Source§fn read_xdr_into_to_end<R>(&mut self, r: &mut Limited<R>) -> Result<(), Error>where
R: Read,
fn read_xdr_into_to_end<R>(&mut self, r: &mut Limited<R>) -> Result<(), Error>where
R: Read,
Read the XDR into the existing value, and consider it an error if the
read does not completely consume the read implementation. Read more
Source§fn read_xdr_iter<R>(r: &mut Limited<R>) -> ReadXdrIter<&mut R, Self> ⓘwhere
R: Read,
fn read_xdr_iter<R>(r: &mut Limited<R>) -> ReadXdrIter<&mut R, Self> ⓘwhere
R: Read,
Create an iterator that reads the read implementation as a stream of
values that are read into the implementing type. Read more
Source§impl WriteXdr for TimeBounds
impl WriteXdr for TimeBounds
impl Eq for TimeBounds
impl StructuralPartialEq for TimeBounds
Auto Trait Implementations§
impl Freeze for TimeBounds
impl RefUnwindSafe for TimeBounds
impl Send for TimeBounds
impl Sync for TimeBounds
impl Unpin for TimeBounds
impl UnwindSafe for TimeBounds
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