pub struct PullInfo<T: Clone> {
pub commits_reverted: NonZeroUsize,
pub old_writer_commit: Commit<T>,
}
Expand description
Metadata about a Writer::pull()
This is a container for holding the metadata
Writer
pull operations produce.
It is returned from pull-like functions.
Fields§
§commits_reverted: NonZeroUsize
How many Commit
’s did the Writer
go backwards?
For example, if the Writer
’s Timestamp
is 5
and they Writer::pull()
’ed when the Reader
’s
Timestamp
was 3
, this field would hold 2
.
old_writer_commit: Commit<T>
Trait Implementations§
source§impl<'__de, T> BorrowDecode<'__de> for PullInfo<T>where
T: BorrowDecode<'__de> + Clone,
impl<'__de, T> BorrowDecode<'__de> for PullInfo<T>where
T: BorrowDecode<'__de> + Clone,
source§fn borrow_decode<__D: BorrowDecoder<'__de>>(
decoder: &mut __D
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de>>( decoder: &mut __D ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
source§impl<T> BorshDeserialize for PullInfo<T>where
T: BorshDeserialize + Clone,
impl<T> BorshDeserialize for PullInfo<T>where
T: BorshDeserialize + Clone,
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl<T> BorshSerialize for PullInfo<T>where
T: BorshSerialize + Clone,
impl<T> BorshSerialize for PullInfo<T>where
T: BorshSerialize + Clone,
source§impl<'de, T> Deserialize<'de> for PullInfo<T>where
T: Deserialize<'de> + Clone,
impl<'de, T> Deserialize<'de> for PullInfo<T>where
T: Deserialize<'de> + Clone,
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
source§impl<T: Ord + Clone> Ord for PullInfo<T>
impl<T: Ord + Clone> Ord for PullInfo<T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq + Clone> PartialEq for PullInfo<T>
impl<T: PartialEq + Clone> PartialEq for PullInfo<T>
source§impl<T: PartialOrd + Clone> PartialOrd for PullInfo<T>
impl<T: PartialOrd + Clone> PartialOrd for PullInfo<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy + Clone> Copy for PullInfo<T>
impl<T: Eq + Clone> Eq for PullInfo<T>
impl<T: Clone> StructuralPartialEq for PullInfo<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for PullInfo<T>where
T: RefUnwindSafe,
impl<T> Send for PullInfo<T>where
T: Send,
impl<T> Sync for PullInfo<T>where
T: Sync,
impl<T> Unpin for PullInfo<T>where
T: Unpin,
impl<T> UnwindSafe for PullInfo<T>where
T: UnwindSafe,
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