pub enum ClaimPredicate {
Unconditional,
And(Box<ClaimPredicate>, Box<ClaimPredicate>),
Or(Box<ClaimPredicate>, Box<ClaimPredicate>),
Not(Box<ClaimPredicate>),
BeforeAbsoluteTime(DateTime<Utc>),
BeforeRelativeTime(Duration),
}Variants§
Unconditional
And(Box<ClaimPredicate>, Box<ClaimPredicate>)
Or(Box<ClaimPredicate>, Box<ClaimPredicate>)
Not(Box<ClaimPredicate>)
BeforeAbsoluteTime(DateTime<Utc>)
BeforeRelativeTime(Duration)
Implementations§
Source§impl ClaimPredicate
impl ClaimPredicate
Sourcepub fn new_unconditional() -> ClaimPredicate
pub fn new_unconditional() -> ClaimPredicate
Returns an unconditional predicate.
Sourcepub fn new_and(p1: ClaimPredicate, p2: ClaimPredicate) -> ClaimPredicate
pub fn new_and(p1: ClaimPredicate, p2: ClaimPredicate) -> ClaimPredicate
Returns a predicate that is true if p1 and p2 are both true.
Sourcepub fn new_or(p1: ClaimPredicate, p2: ClaimPredicate) -> ClaimPredicate
pub fn new_or(p1: ClaimPredicate, p2: ClaimPredicate) -> ClaimPredicate
Returns a predicate that is true if at least one of p1 or p2 is true.
Sourcepub fn new_not(predicate: ClaimPredicate) -> ClaimPredicate
pub fn new_not(predicate: ClaimPredicate) -> ClaimPredicate
Returns a predicate that is true if predicate is false.
Sourcepub fn new_before_absolute_time(datetime: DateTime<Utc>) -> ClaimPredicate
pub fn new_before_absolute_time(datetime: DateTime<Utc>) -> ClaimPredicate
Returns a predicate that is true the ledger close time is before datetime.
Sourcepub fn new_before_relative_time(duration: Duration) -> ClaimPredicate
pub fn new_before_relative_time(duration: Duration) -> ClaimPredicate
Returns a predicate that is true the ledger close time is
within duration of the current ledger close time.
Sourcepub fn to_xdr(&self) -> Result<ClaimPredicate>
pub fn to_xdr(&self) -> Result<ClaimPredicate>
Returns the xdr object.
Sourcepub fn from_xdr(x: &ClaimPredicate) -> Result<ClaimPredicate>
pub fn from_xdr(x: &ClaimPredicate) -> Result<ClaimPredicate>
Creates from the xdr object.
Trait Implementations§
Source§impl Clone for ClaimPredicate
impl Clone for ClaimPredicate
Source§fn clone(&self) -> ClaimPredicate
fn clone(&self) -> ClaimPredicate
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 ClaimPredicate
impl Debug for ClaimPredicate
Source§impl PartialEq for ClaimPredicate
impl PartialEq for ClaimPredicate
Source§impl ReadXdr for ClaimPredicate
impl ReadXdr for ClaimPredicate
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 ClaimPredicate
impl WriteXdr for ClaimPredicate
impl Eq for ClaimPredicate
impl StructuralPartialEq for ClaimPredicate
Auto Trait Implementations§
impl Freeze for ClaimPredicate
impl RefUnwindSafe for ClaimPredicate
impl Send for ClaimPredicate
impl Sync for ClaimPredicate
impl Unpin for ClaimPredicate
impl UnwindSafe for ClaimPredicate
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