[][src]Struct euca::patch::PatchSet

pub struct PatchSet<'a, Message, Command, K: Eq + Hash> {
    pub patches: Vec<Patch<'a, Message, Command, K>>,
    pub keyed: HashMap<&'a K, Vec<Patch<'a, Message, Command, K>>>,
}

A series of Patches to apply to the dom.

Fields

patches: Vec<Patch<'a, Message, Command, K>>

The patches in this patch set.

keyed: HashMap<&'a K, Vec<Patch<'a, Message, Command, K>>>

Mini patch sets for keyed nodes.

Implementations

impl<'a, Message, Command, K: Eq + Hash> PatchSet<'a, Message, Command, K>[src]

pub fn new() -> Self[src]

Create an empty PatchSet.

pub fn push(&mut self, patch: Patch<'a, Message, Command, K>)[src]

Push a patch on to the end of the PatchSet.

pub fn root_key(&mut self, key: &'a K)[src]

Move the top level patch set into a keyed entry.

pub fn extend(&mut self, other: Self)[src]

Put the patches from the given patch set into this PatchSet.

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

Return the length of the PatchSet.

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

Return true if applying this PatchSet won't actually alter the browser's dom representation and false otherwise.

pub fn prepare(
    self,
    app: &Dispatcher<Message, Command>
) -> (Storage<Message>, Vec<Node>) where
    Message: Clone + PartialEq + Debug + 'static,
    Command: SideEffect<Message> + Debug + 'static,
    EventHandler<'a, Message>: Clone
[src]

Prep the given PatchSet by creating any elements in the set and placing them in Storage. While elements will be removed from the given parent, nothing will be attached. Events will be dispatched via the given Dispatcher.

pub fn apply(
    self,
    parent: &Element,
    app: &Dispatcher<Message, Command>
) -> Storage<Message> where
    Message: Clone + PartialEq + Debug + 'static,
    Command: SideEffect<Message> + Debug + 'static,
    EventHandler<'a, Message>: Clone
[src]

Apply the given PatchSet creating any elements under the given parent node. Events are dispatched via the given Dispatcher.

Trait Implementations

impl<'a, Message: Debug, Command: Debug, K: Debug + Eq + Hash> Debug for PatchSet<'a, Message, Command, K>[src]

impl<'a, Message: Default, Command: Default, K: Default + Eq + Hash> Default for PatchSet<'a, Message, Command, K>[src]

impl<'a, Message, Command, K: Eq + Hash> From<Vec<Patch<'a, Message, Command, K>>> for PatchSet<'a, Message, Command, K>[src]

impl<'a, Message, Command, K: Eq + Hash> IntoIterator for PatchSet<'a, Message, Command, K>[src]

type Item = Patch<'a, Message, Command, K>

The type of the elements being iterated over.

type IntoIter = IntoIter<Patch<'a, Message, Command, K>>

Which kind of iterator are we turning this into?

Auto Trait Implementations

impl<'a, Message, Command, K> !RefUnwindSafe for PatchSet<'a, Message, Command, K>

impl<'a, Message, Command, K> !Send for PatchSet<'a, Message, Command, K>

impl<'a, Message, Command, K> !Sync for PatchSet<'a, Message, Command, K>

impl<'a, Message, Command, K> Unpin for PatchSet<'a, Message, Command, K> where
    Message: Unpin

impl<'a, Message, Command, K> !UnwindSafe for PatchSet<'a, Message, Command, K>

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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, 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<M> Update<(), ()> for M[src]