Pushable

Trait Pushable 

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

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

Required Methods§

Source

fn push(&mut self, other: &T)

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§

Source§

impl Pushable<str> for String

Source§

fn push(&mut self, other: &str)

Source§

impl Pushable<String> for String

Source§

fn push(&mut self, other: &String)

Implementors§

Source§

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

Source§

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

Source§

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

Source§

impl<T> Pushable<&str> for Spans<T>

Source§

impl<T> Pushable<str> for Spans<T>

Source§

impl<T: Clone + PartialEq> Pushable<Spans<T>> for Spans<T>