Struct bincode::SliceBox [] [src]

pub struct SliceBox<'a, T: 'a> { /* fields omitted */ }

Like a RefBox, but encodes from a [T] and encodes to a Vec<T>.

Methods

impl<'a, T> SliceBox<'a, T>
[src]

[src]

Creates a new RefBox that looks at a borrowed value.

[src]

Extract a Vec<T> from a SliceBox.

[src]

Convert to an Owned SliceBox.

impl<T> SliceBox<'static, T>
[src]

[src]

Creates a new SliceBox made from an allocated Vec<T>.

[src]

Takes the value out of this refbox.

Fails if this refbox was not created out of a deserialization.

Unless you are doing some really weird things with static references, this function will never fail.

[src]

Tries to take the value out of this refbox.

Trait Implementations

impl<'a, T: Debug + 'a> Debug for SliceBox<'a, T>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a, T: PartialEq + 'a> PartialEq for SliceBox<'a, T>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<'a, T: PartialOrd + 'a> PartialOrd for SliceBox<'a, T>
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, T: Eq + 'a> Eq for SliceBox<'a, T>
[src]

impl<'a, T: Ord + 'a> Ord for SliceBox<'a, T>
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<'a, T: Hash + 'a> Hash for SliceBox<'a, T>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a, T: Clone + 'a> Clone for SliceBox<'a, T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a, T: Encodable> Encodable for SliceBox<'a, T>
[src]

[src]

Serialize a value using an Encoder.

impl<T: Decodable> Decodable for SliceBox<'static, T>
[src]

[src]

Deserialize a value using a Decoder.