Type Alias holochain::prelude::dependencies::kitsune_p2p_fetch::OpHashSized
pub type OpHashSized = RoughSized<Arc<KitsuneOpHash, Global>>;
Expand description
An op hash combined with an approximate size of the op
Aliased Type§
struct OpHashSized { /* private fields */ }
Implementations§
§impl<T> RoughSized<T>
impl<T> RoughSized<T>
pub fn new(data: T, size: Option<RoughInt>) -> RoughSized<T>
§impl<T> RoughSized<T>
impl<T> RoughSized<T>
pub fn into_inner(self) -> (T, Option<RoughInt>)
pub fn into_inner(self) -> (T, Option<RoughInt>)
Break into constituent parts
pub fn maybe_size(&self) -> Option<RoughInt>
pub fn maybe_size(&self) -> Option<RoughInt>
Accessor
§impl<T> RoughSized<T>where
T: Clone,
impl<T> RoughSized<T>where T: Clone,
pub fn data(&self) -> T
pub fn data(&self) -> T
Accessor
Trait Implementations§
§impl<T> Clone for RoughSized<T>where
T: Clone,
impl<T> Clone for RoughSized<T>where T: Clone,
§fn clone(&self) -> RoughSized<T>
fn clone(&self) -> RoughSized<T>
Returns a copy 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 more§impl<T> Debug for RoughSized<T>where
T: Debug,
impl<T> Debug for RoughSized<T>where T: Debug,
§impl<T> Deref for RoughSized<T>
impl<T> Deref for RoughSized<T>
§impl<'de, T> Deserialize<'de> for RoughSized<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for RoughSized<T>where T: Deserialize<'de>,
§fn deserialize<__D>(
__deserializer: __D
) -> Result<RoughSized<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<RoughSized<T>, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<T> From<(T, Option<RoughInt>)> for RoughSized<T>
impl<T> From<(T, Option<RoughInt>)> for RoughSized<T>
§fn from(original: (T, Option<RoughInt>)) -> RoughSized<T>
fn from(original: (T, Option<RoughInt>)) -> RoughSized<T>
Converts to this type from the input type.
§impl<T> Hash for RoughSized<T>where
T: Hash,
impl<T> Hash for RoughSized<T>where T: Hash,
§impl<T> PartialEq<RoughSized<T>> for RoughSized<T>where
T: PartialEq<T>,
impl<T> PartialEq<RoughSized<T>> for RoughSized<T>where T: PartialEq<T>,
§fn eq(&self, other: &RoughSized<T>) -> bool
fn eq(&self, other: &RoughSized<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<T> Serialize for RoughSized<T>where
T: Serialize,
impl<T> Serialize for RoughSized<T>where T: Serialize,
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more