pub struct Indexed<T>where
T: Signable,{ /* private fields */ }
Expand description
A pair consistsing of signable data and a NodeIndex
.
This is a wrapper used for signing data which does not implement the Index
trait.
If a node with an index i
needs to sign some data signable
which does not
implement the Index
trait, it should use the Signed::sign_with_index
method which will
use this wrapper transparently. Note that in the implementation of Signable
for Indexed<T>
,
the hash is the hash of the underlying data T
. Therefore, instances of the type
Signed<Indexed<T>, MK>
can be aggregated into Multisigned<T, MK>
Implementations§
Trait Implementations§
Source§impl<T> Decode for Indexed<T>
impl<T> Decode for Indexed<T>
Source§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Indexed<T>, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Indexed<T>, Error>where
__CodecInputEdqy: Input,
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl<T> Encode for Indexed<T>
impl<T> Encode for Indexed<T>
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
impl<T> EncodeLike for Indexed<T>
impl<T> Eq for Indexed<T>
impl<T> StructuralPartialEq for Indexed<T>where
T: Signable,
Auto Trait Implementations§
impl<T> Freeze for Indexed<T>where
T: Freeze,
impl<T> RefUnwindSafe for Indexed<T>where
T: RefUnwindSafe,
impl<T> Send for Indexed<T>where
T: Send,
impl<T> Sync for Indexed<T>where
T: Sync,
impl<T> Unpin for Indexed<T>where
T: Unpin,
impl<T> UnwindSafe for Indexed<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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more