Enum snarkos_node_messages::helpers::Data
source · pub enum Data<T: FromBytes + ToBytes + Send + 'static> {
Object(T),
Buffer(Bytes),
}
Expand description
This object enables deferred deserialization / ahead-of-time serialization for objects that take a while to deserialize / serialize, in order to allow these operations to be non-blocking.
Variants§
Implementations§
Trait Implementations§
source§impl<T: PartialEq + FromBytes + ToBytes + Send + 'static> PartialEq<Data<T>> for Data<T>
impl<T: PartialEq + FromBytes + ToBytes + Send + 'static> PartialEq<Data<T>> for Data<T>
impl<T: Eq + FromBytes + ToBytes + Send + 'static> Eq for Data<T>
impl<T: FromBytes + ToBytes + Send + 'static> StructuralEq for Data<T>
impl<T: FromBytes + ToBytes + Send + 'static> StructuralPartialEq for Data<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Data<T>where T: RefUnwindSafe,
impl<T> Send for Data<T>
impl<T> Sync for Data<T>where T: Sync,
impl<T> Unpin for Data<T>where T: Unpin,
impl<T> UnwindSafe for Data<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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.