Struct bincode::StrBox [] [src]

pub struct StrBox<'a> { /* fields omitted */ }

Like a RefBox, but encoding from a str and decoedes to a String.

Methods

impl<'a> StrBox<'a>
[src]

Creates a new StrBox that looks at a borrowed value.

Extract a String from a StrBox.

Convert to an Owned SliceBox.

impl StrBox<'static>
[src]

Creates a new StrBox made from an allocated String.

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.

Tries to take the value out of this refbox.

Trait Implementations

impl<'a> Debug for StrBox<'a>
[src]

Formats the value using the given formatter.

impl<'a> PartialEq for StrBox<'a>
[src]

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

This method tests for !=.

impl<'a> PartialOrd for StrBox<'a>
[src]

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

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

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

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

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

impl<'a> Eq for StrBox<'a>
[src]

impl<'a> Ord for StrBox<'a>
[src]

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

impl<'a> Hash for StrBox<'a>
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl<'a> Clone for StrBox<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> AsRef<str> for StrBox<'a>
[src]

Performs the conversion.

impl<'a> Encodable for StrBox<'a>
[src]

Serialize a value using an Encoder.

impl Decodable for StrBox<'static>
[src]

Deserialize a value using a Decoder.

impl<'a> Serialize for StrBox<'a>
[src]

Serializes this value into this serializer.

impl Deserialize for StrBox<'static>
[src]

Deserialize this value given this Deserializer.