Trait stylish_stringlike::text::Pushable[][src]

pub trait Pushable<T: ?Sized> {
    fn push(&mut self, other: &T);
}
Expand description

Trait for text objects that can have content pushed into them without changing type.

Required methods

fn push(&mut self, other: &T)[src]

Pushes another text object onto this one. String implements this trivially.

Example

use stylish_stringlike::text::Pushable;
let mut foobar = String::from("foo");
let bar = "bar";
Pushable::<str>::push(&mut foobar, &bar);
assert_eq!(foobar, String::from("foobar"));

Implementations on Foreign Types

impl Pushable<str> for String[src]

fn push(&mut self, other: &str)[src]

impl Pushable<String> for String[src]

fn push(&mut self, other: &String)[src]

Implementors

impl<'a, T: Clone + PartialEq> Pushable<Span<'a, T>> for Spans<T>[src]

fn push(&mut self, other: &Span<'a, T>)[src]

impl<'a, T: Clone> Pushable<str> for Span<'a, T>[src]

fn push(&mut self, other: &str)[src]

impl<S, O: Sized> Pushable<Option<O>> for S where
    S: Pushable<O>, 
[src]

fn push(&mut self, other: &Option<O>)[src]

impl<T> Pushable<&'_ str> for Spans<T>[src]

fn push(&mut self, other: &&str)[src]

impl<T> Pushable<str> for Spans<T>[src]

fn push(&mut self, other: &str)[src]

impl<T: Clone + PartialEq> Pushable<Spans<T>> for Spans<T>[src]

fn push(&mut self, other: &Spans<T>)[src]