[][src]Trait crndm::str::ToString

pub trait ToString<A: MemPool> {
    pub fn to_pstring(&self, journal: &Journal<A>) -> String<A>;
}

Required methods

pub fn to_pstring(&self, journal: &Journal<A>) -> String<A>[src]

Converts the given value to a String.

Examples

Basic usage:

Heap::transaction(|j| {
    let i: i32 = 5;
    let five = String::<Heap>::pfrom("5", j);

    assert_eq!(five, i.to_pstring(j));
}).unwrap();
Loading content...

Implementations on Foreign Types

impl<A: MemPool> ToString<A> for str[src]

impl<A: MemPool, '_> ToString<A> for Cow<'_, str>[src]

impl<A: MemPool> ToString<A> for StdString[src]

Loading content...

Implementors

impl<T: Display + ?Sized, A: MemPool> ToString<A> for T[src]

Panics

In this implementation, the to_string method panics if the Display implementation returns an error. This indicates an incorrect Display implementation since fmt::Write for String never returns an error itself.

Loading content...