pub struct P256PeerId {
pub y_odd: bool,
pub x: [u8; 32],
}Expand description
ECDSA P-256 identity of a network peer.
A P256PeerId is essentially the same as a PeerId but with an ECDSA P-256 public key instead
of an Ed25519 public key. This exists primarily to support WebTransport; at least as of June
2026, most browsers do not support using Ed25519 for TLS handshake signing.
Note that unlike PeerId no portion of the ID space is reserved for anonymous peers.
Fields§
§y_odd: bool§x: [u8; 32]Implementations§
Trait Implementations§
Source§impl Clone for P256PeerId
impl Clone for P256PeerId
impl ConstEncodedLen for P256PeerId
impl Copy for P256PeerId
Source§impl Debug for P256PeerId
impl Debug for P256PeerId
Source§impl Decode for P256PeerId
impl Decode for P256PeerId
Source§fn 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.
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 Display for P256PeerId
impl Display for P256PeerId
Source§impl Encode for P256PeerId
impl Encode for P256PeerId
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: 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.
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 EncodeLike for P256PeerId
impl Eq for P256PeerId
Source§impl From<&VerifyingKey<NistP256>> for P256PeerId
impl From<&VerifyingKey<NistP256>> for P256PeerId
Source§fn from(pk: &VerifyingKey) -> Self
fn from(pk: &VerifyingKey) -> Self
Converts to this type from the input type.
Source§impl MaxEncodedLen for P256PeerId
impl MaxEncodedLen for P256PeerId
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
Source§impl PartialEq for P256PeerId
impl PartialEq for P256PeerId
impl StructuralPartialEq for P256PeerId
Auto Trait Implementations§
impl Freeze for P256PeerId
impl RefUnwindSafe for P256PeerId
impl Send for P256PeerId
impl Sync for P256PeerId
impl Unpin for P256PeerId
impl UnsafeUnpin for P256PeerId
impl UnwindSafe for P256PeerId
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,
impl<S> Codec for S
Source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> EncodeLike<&&T> for Twhere
T: Encode,
impl<T> EncodeLike<&T> for Twhere
T: Encode,
impl<T> EncodeLike<&mut T> for Twhere
T: Encode,
impl<T> EncodeLike<Arc<T>> for Twhere
T: Encode,
impl<T> EncodeLike<Box<T>> for Twhere
T: Encode,
impl<T> EncodeLike<Cow<'_, T>> for T
impl<T> EncodeLike<Rc<T>> for Twhere
T: Encode,
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.impl<S> FullCodec for Swhere
S: Decode + FullEncode,
impl<S> FullEncode for Swhere
S: Encode + EncodeLike,
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<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 moreimpl<T> JsonSchemaMaybe for T
impl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> Truncated for T
impl<T> Truncated for T
Source§fn truncated<const N: u32>(&self) -> BoundedString<N>
fn truncated<const N: u32>(&self) -> BoundedString<N>
Convert
self to a BoundedString, truncating if necessary. In the case of truncation,
the discarded characters are replaced by “…”.