Struct sp_core::OpaquePeerId
source · [−]Expand description
Simple blob to hold a PeerId
without committing to its format.
Tuple Fields
0: Vec<u8>
Implementations
Trait Implementations
sourceimpl Clone for OpaquePeerId
impl Clone for OpaquePeerId
sourcefn clone(&self) -> OpaquePeerId
fn clone(&self) -> OpaquePeerId
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for OpaquePeerId
impl Debug for OpaquePeerId
sourceimpl Decode for OpaquePeerId
impl Decode for OpaquePeerId
sourcefn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
Attempt to deserialise the value from input.
sourcefn skip<I>(input: &mut I) -> Result<(), Error> where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error> where
I: Input,
Attempt to skip the encoded value from input. Read more
sourcefn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
sourceimpl Default for OpaquePeerId
impl Default for OpaquePeerId
sourcefn default() -> OpaquePeerId
fn default() -> OpaquePeerId
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for OpaquePeerId
impl<'de> Deserialize<'de> for OpaquePeerId
sourcefn 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
sourceimpl Encode for OpaquePeerId
impl Encode for OpaquePeerId
sourcefn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
Convert self to a slice and append it to the destination.
sourcefn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Convert self to an owned vector.
sourcefn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
sourcefn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
sourcefn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
sourceimpl Ord for OpaquePeerId
impl Ord for OpaquePeerId
sourceimpl PartialEq<OpaquePeerId> for OpaquePeerId
impl PartialEq<OpaquePeerId> for OpaquePeerId
sourcefn eq(&self, other: &OpaquePeerId) -> bool
fn eq(&self, other: &OpaquePeerId) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &OpaquePeerId) -> bool
fn ne(&self, other: &OpaquePeerId) -> bool
This method tests for !=
.
sourceimpl PartialOrd<OpaquePeerId> for OpaquePeerId
impl PartialOrd<OpaquePeerId> for OpaquePeerId
sourcefn partial_cmp(&self, other: &OpaquePeerId) -> Option<Ordering>
fn partial_cmp(&self, other: &OpaquePeerId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl PassBy for OpaquePeerId
impl PassBy for OpaquePeerId
type PassBy = Inner<OpaquePeerId, Vec<u8>>
type PassBy = Inner<OpaquePeerId, Vec<u8>>
The strategy that should be used to pass the type.
sourceimpl PassByInner for OpaquePeerId
impl PassByInner for OpaquePeerId
sourcefn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Consumes self
and returns the inner type.
sourcefn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Construct Self
from the given inner
.
sourceimpl Serialize for OpaquePeerId
impl Serialize for OpaquePeerId
impl EncodeLike<OpaquePeerId> for OpaquePeerId
impl Eq for OpaquePeerId
impl StructuralEq for OpaquePeerId
impl StructuralPartialEq for OpaquePeerId
Auto Trait Implementations
impl RefUnwindSafe for OpaquePeerId
impl Send for OpaquePeerId
impl Sync for OpaquePeerId
impl Unpin for OpaquePeerId
impl UnwindSafe for OpaquePeerId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> DecodeLimit for T where
T: Decode,
impl<T> DecodeLimit for T where
T: Decode,
sourceimpl<T> FromFFIValue for T where
T: PassBy,
impl<T> FromFFIValue for T where
T: PassBy,
type SelfInstance = T
type SelfInstance = T
As Self
can be an unsized type, it needs to be represented by a sized type at the host.
This SelfInstance
is the sized type. Read more
sourcepub fn from_ffi_value(
context: &mut dyn FunctionContext,
arg: <<T as PassBy>::PassBy as RIType>::FFIType
) -> Result<T, String>
pub fn from_ffi_value(
context: &mut dyn FunctionContext,
arg: <<T as PassBy>::PassBy as RIType>::FFIType
) -> Result<T, String>
Create SelfInstance
from the given
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoFFIValue for T where
T: PassBy,
impl<T> IntoFFIValue for T where
T: PassBy,
sourcepub fn into_ffi_value(
self,
context: &mut dyn FunctionContext
) -> Result<<<T as PassBy>::PassBy as RIType>::FFIType, String>
pub fn into_ffi_value(
self,
context: &mut dyn FunctionContext
) -> Result<<<T as PassBy>::PassBy as RIType>::FFIType, String>
Convert self
into a ffi value.
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcefn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to unchecked_from
.