[][src]Struct undo::Merged

pub struct Merged<R> { /* fields omitted */ }

The result of merging commands.

The merge! macro can be used for convenience when merging commands.

Methods

impl<R> Merged<R>[src]

pub fn new(
    cmd1: impl Command<R> + 'static,
    cmd2: impl Command<R> + 'static
) -> Merged<R>
[src]

Merges cmd1 and cmd2 into a single command.

pub fn push(&mut self, command: impl Command<R> + 'static)[src]

Merges self with command.

pub fn join(self, command: impl Command<R> + 'static) -> Merged<R>[src]

Merges self with command and returns the merged command.

pub fn len(&self) -> usize[src]

Returns the amount of commands that have been merged.

pub fn is_empty(&self) -> bool[src]

Returns true if no commands have been merged.

pub fn set_text(&mut self, text: impl Into<String>)[src]

Overrides the text for the two merged commands.

Trait Implementations

impl<R> Command<R> for Merged<R>[src]

impl<R> Default for Merged<R>[src]

impl<R, C: Command<R> + 'static> Extend<C> for Merged<R>[src]

impl<R> IntoIterator for Merged<R>[src]

type Item = Box<dyn Command<R>>

The type of the elements being iterated over.

type IntoIter = IntoIter<Self::Item>

Which kind of iterator are we turning this into?

impl<R> Display for Merged<R>[src]

impl<R> Debug for Merged<R>[src]

impl<R, C: Command<R> + 'static> FromIterator<C> for Merged<R>[src]

Auto Trait Implementations

impl<R> !Send for Merged<R>

impl<R> !Sync for Merged<R>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]