Skip to main content

SerIter

Struct SerIter 

Source
pub struct SerIter<T, I: ExactSizeIterator>(/* private fields */);
Expand description

A wrapper serializing an exact-size iterator as a boxed slice.

For more information, see the module-level documentation.

Implementations§

Source§

impl<T, I: ExactSizeIterator> SerIter<T, I>

Source

pub fn new(iter: I) -> Self

Trait Implementations§

Source§

impl<T: Clone, I: Clone + ExactSizeIterator> Clone for SerIter<T, I>

Source§

fn clone(&self) -> SerIter<T, I>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug, I: Debug + ExactSizeIterator> Debug for SerIter<T, I>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Default, I: Default + ExactSizeIterator> Default for SerIter<T, I>

Source§

fn default() -> SerIter<T, I>

Returns the “default value” for a type. Read more
Source§

impl<T, I: ExactSizeIterator> From<I> for SerIter<T, I>

Source§

fn from(iter: I) -> Self

Converts to this type from the input type.
Source§

impl<T: PartialEq, I: PartialEq + ExactSizeIterator> PartialEq for SerIter<T, I>

Source§

fn eq(&self, other: &SerIter<T, I>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T, I> SerHelper<Deep> for SerIter<T, I>
where I: ExactSizeIterator, I::Item: Borrow<T>, T: DeepCopy,

Source§

unsafe fn _ser_inner(&self, backend: &mut impl WriteWithNames) -> Result<()>

Safety Read more
Source§

impl<T, I> SerHelper<Zero> for SerIter<T, I>
where I: ExactSizeIterator, I::Item: Borrow<T>, T: ZeroCopy,

Source§

unsafe fn _ser_inner(&self, backend: &mut impl WriteWithNames) -> Result<()>

Safety Read more
Source§

impl<T, I> SerInner for SerIter<T, I>
where I: ExactSizeIterator, I::Item: Borrow<T>, T: CopyType + SerInner, Self: SerHelper<<T as CopyType>::Copy>,

Source§

const IS_ZERO_COPY: bool = false

Inner constant used by the derive macros to keep track recursively of whether the type satisfies the conditions for being zero-copy. It is checked at runtime against the trait implemented by the type, and if a ZeroCopy type has this constant set to false serialization will panic.
Source§

type SerType = Box<[<T as SerInner>::SerType]>

This is the type that will be written in the header of the file, and thus the type that will be deserialized. In most cases it is Self, but in some cases, as for references to slices, it is customized.
Source§

unsafe fn _ser_inner(&self, backend: &mut impl WriteWithNames) -> Result<()>

Serializes this structure using the given backend. Read more
Source§

impl<T: Eq, I: Eq + ExactSizeIterator> Eq for SerIter<T, I>

Source§

impl<T, I: ExactSizeIterator> StructuralPartialEq for SerIter<T, I>

Auto Trait Implementations§

§

impl<T, I> !Freeze for SerIter<T, I>

§

impl<T, I> !RefUnwindSafe for SerIter<T, I>

§

impl<T, I> Send for SerIter<T, I>
where I: Send, T: Send,

§

impl<T, I> !Sync for SerIter<T, I>

§

impl<T, I> Unpin for SerIter<T, I>
where T: Unpin, I: Unpin,

§

impl<T, I> UnsafeUnpin for SerIter<T, I>
where I: UnsafeUnpin,

§

impl<T, I> UnwindSafe for SerIter<T, I>
where T: UnwindSafe, I: 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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.