BinaryHeap

Struct BinaryHeap 

Source
pub struct BinaryHeap<T, Len = BincodeLen>(/* private fields */);
Available on crate feature alloc only.
Expand description

A BinaryHeap with a customizable length encoding and optimized read/write implementation for Pod.

Trait Implementations§

Source§

impl<T, Len> SchemaRead<'_> for BinaryHeap<Pod<T>, Len>
where Len: SeqLen, T: Ord + Copy + 'static,

Source§

type Dst = BinaryHeap<T>

Source§

fn read( reader: &mut Reader<'_>, dst: &mut MaybeUninit<Self::Dst>, ) -> ReadResult<()>

Read into dst from reader. Read more
Source§

fn get(reader: &mut Reader<'de>) -> ReadResult<Self::Dst>

Read Self::Dst from reader into a new Self::Dst.
Source§

impl<'de, T, Len> SchemaRead<'de> for BinaryHeap<Elem<T>, Len>
where Len: SeqLen, T: SchemaRead<'de>, T::Dst: Ord,

Source§

type Dst = BinaryHeap<<T as SchemaRead<'de>>::Dst>

Source§

fn read( reader: &mut Reader<'de>, dst: &mut MaybeUninit<Self::Dst>, ) -> ReadResult<()>

Read into dst from reader. Read more
Source§

fn get(reader: &mut Reader<'de>) -> ReadResult<Self::Dst>

Read Self::Dst from reader into a new Self::Dst.
Source§

impl<T, Len> SchemaWrite for BinaryHeap<Elem<T>, Len>
where Len: SeqLen, T: SchemaWrite, T::Src: Sized,

Source§

type Src = BinaryHeap<<T as SchemaWrite>::Src>

Source§

fn size_of(src: &Self::Src) -> WriteResult<usize>

Get the serialized size of Self::Src.
Source§

fn write(writer: &mut Writer<'_>, src: &Self::Src) -> WriteResult<()>

Write Self::Src to writer.
Source§

impl<T, Len> SchemaWrite for BinaryHeap<Pod<T>, Len>
where T: Copy + 'static, Len: SeqLen,

Source§

type Src = BinaryHeap<T>

Source§

fn size_of(src: &Self::Src) -> WriteResult<usize>

Get the serialized size of Self::Src.
Source§

fn write(writer: &mut Writer<'_>, src: &Self::Src) -> WriteResult<()>

Write Self::Src to writer.

Auto Trait Implementations§

§

impl<T, Len> Freeze for BinaryHeap<T, Len>

§

impl<T, Len> RefUnwindSafe for BinaryHeap<T, Len>

§

impl<T, Len> Send for BinaryHeap<T, Len>
where Len: Send, T: Send,

§

impl<T, Len> Sync for BinaryHeap<T, Len>
where Len: Sync, T: Sync,

§

impl<T, Len> Unpin for BinaryHeap<T, Len>
where Len: Unpin, T: Unpin,

§

impl<T, Len> UnwindSafe for BinaryHeap<T, Len>
where Len: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<'de, T> Deserialize<'de> for T
where T: SchemaRead<'de>,

Source§

fn deserialize(bytes: &'de [u8]) -> ReadResult<Self::Dst>

Deserialize bytes into a new Self::Dst.
Source§

fn deserialize_into( bytes: &'de [u8], target: &mut MaybeUninit<Self::Dst>, ) -> ReadResult<()>

Deserialize bytes into target.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Serialize for T
where T: SchemaWrite + ?Sized,

Source§

fn serialize(src: &Self::Src) -> WriteResult<Vec<u8>>

Available on crate feature alloc only.
Serialize a serializable type into a Vec of bytes.
Source§

fn serialize_into( src: &Self::Src, target: &mut [MaybeUninit<u8>], ) -> WriteResult<usize>

Serialize a serializable type into the given byte buffer. Read more
Source§

fn serialized_size(src: &Self::Src) -> WriteResult<u64>

Get the size in bytes of the type when serialized.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.