pub struct Parents(/* private fields */);
Expand description
Implementations§
source§impl Parents
impl Parents
sourcepub const COUNT_RANGE: RangeInclusive<u8> = _
pub const COUNT_RANGE: RangeInclusive<u8> = _
The range representing the valid number of parents.
sourcepub fn from_set(inner: BTreeSet<BlockId>) -> Result<Parents, Error>
pub fn from_set(inner: BTreeSet<BlockId>) -> Result<Parents, Error>
Creates new Parents
from an ordered set.
sourcepub fn iter(&self) -> impl ExactSizeIterator
pub fn iter(&self) -> impl ExactSizeIterator
Returns an iterator over the parents.
Trait Implementations§
source§impl Deref for Parentswhere
BoxedSlicePrefix<BlockId, BoundedU8<iota_sdk::::types::block::parent::ParentCount::{constant#0}, iota_sdk::::types::block::parent::ParentCount::{constant#1}>>: Deref,
impl Deref for Parentswhere
BoxedSlicePrefix<BlockId, BoundedU8<iota_sdk::::types::block::parent::ParentCount::{constant#0}, iota_sdk::::types::block::parent::ParentCount::{constant#1}>>: Deref,
source§impl<'de> Deserialize<'de> for Parents
impl<'de> Deserialize<'de> for Parents
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Parents, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Parents, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Packable for Parents
impl Packable for Parents
§type UnpackError = Error
type UnpackError = Error
The error type that can be returned if some semantic error occurs while unpacking. Read more
§type UnpackVisitor = <BoxedSlicePrefix<BlockId, BoundedU8<iota_sdk::::types::block::parent::ParentCount::{constant#0}, iota_sdk::::types::block::parent::ParentCount::{constant#1}>> as Packable>::UnpackVisitor
type UnpackVisitor = <BoxedSlicePrefix<BlockId, BoundedU8<iota_sdk::::types::block::parent::ParentCount::{constant#0}, iota_sdk::::types::block::parent::ParentCount::{constant#1}>> as Packable>::UnpackVisitor
FIXME: docs
source§fn pack<P>(&self, packer: &mut P) -> Result<(), <P as Packer>::Error>where
P: Packer,
fn pack<P>(&self, packer: &mut P) -> Result<(), <P as Packer>::Error>where
P: Packer,
Packs this value into the given
Packer
.source§fn unpack<U, const VERIFY: bool>(
unpacker: &mut U,
visitor: &<Parents as Packable>::UnpackVisitor
) -> Result<Parents, UnpackError<<Parents as Packable>::UnpackError, <U as Unpacker>::Error>>where
U: Unpacker,
fn unpack<U, const VERIFY: bool>(
unpacker: &mut U,
visitor: &<Parents as Packable>::UnpackVisitor
) -> Result<Parents, UnpackError<<Parents as Packable>::UnpackError, <U as Unpacker>::Error>>where
U: Unpacker,
Unpacks this value from the given
Unpacker
. The VERIFY
generic parameter can be used to skip additional
syntactic checks.source§impl PartialEq for Parents
impl PartialEq for Parents
source§impl Serialize for Parents
impl Serialize for Parents
source§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
impl Eq for Parents
impl StructuralPartialEq for Parents
Auto Trait Implementations§
impl Freeze for Parents
impl RefUnwindSafe for Parents
impl Send for Parents
impl Sync for Parents
impl Unpin for Parents
impl UnwindSafe for Parents
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 Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
source§fn from_json(json: &(impl AsRef<str> + ?Sized)) -> Result<Self, Error>
fn from_json(json: &(impl AsRef<str> + ?Sized)) -> Result<Self, Error>
Deserialize
Self
from a string of JSON text.source§fn from_json_slice(json: &(impl AsRef<[u8]> + ?Sized)) -> Result<Self, Error>
fn from_json_slice(json: &(impl AsRef<[u8]> + ?Sized)) -> Result<Self, Error>
Deserialize
Self
from bytes of JSON text.source§fn from_json_value(json: Value) -> Result<Self, Error>
fn from_json_value(json: Value) -> Result<Self, Error>
Deserialize
Self
from a serde_json::Value
.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<P> PackableExt for Pwhere
P: Packable,
impl<P> PackableExt for Pwhere
P: Packable,
source§fn unpack_verified<T>(
bytes: T,
visitor: &<P as Packable>::UnpackVisitor
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_verified<T>( bytes: T, visitor: &<P as Packable>::UnpackVisitor ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>
].
source§fn unpack_unverified<T>(
bytes: T
) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
fn unpack_unverified<T>( bytes: T ) -> Result<P, UnpackError<<P as Packable>::UnpackError, UnexpectedEOF>>
Unpacks this value from a type that implements [AsRef<[u8]>
] skipping some syntatical checks.
source§fn packed_len(&self) -> usize
fn packed_len(&self) -> usize
Returns the length in bytes of the value after being packed. The returned value always matches the number of
bytes written using
pack
.source§impl<T> ToJson for Twhere
T: Serialize,
impl<T> ToJson for Twhere
T: Serialize,
source§fn to_json_value(&self) -> Result<Value, Error>
fn to_json_value(&self) -> Result<Value, Error>
Serialize
self
as a serde_json::Value
.