Skip to main content

UpdateView

Trait UpdateView 

Source
pub trait UpdateView: AsView {
    type UpdateViewType: CandidType + Default;

    // Required method
    fn merge(
        &mut self,
        patch: Self::UpdateViewType,
    ) -> Result<(), MergePatchError>;
}
Expand description

UpdateView

Required Associated Types§

Source

type UpdateViewType: CandidType + Default

A view payload that may be applied to Self.

Required Methods§

Source

fn merge(&mut self, patch: Self::UpdateViewType) -> Result<(), MergePatchError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<K, V> UpdateView for BTreeMap<K, V>

Source§

impl<K, V, S> UpdateView for HashMap<K, V, S>

Source§

impl<T> UpdateView for Option<T>
where T: UpdateView + Default,

Source§

impl<T> UpdateView for BTreeSet<T>
where T: UpdateView + Clone + Default + Ord,

Source§

impl<T> UpdateView for Vec<T>
where T: UpdateView + Default,

Source§

impl<T, S> UpdateView for HashSet<T, S>

Implementors§