Trait multiversx_sc::types::Mergeable

source ·
pub trait Mergeable<M: ManagedTypeApi> {
    // Required methods
    fn can_merge_with(&self, other: &Self) -> bool;
    fn merge_with(&mut self, other: Self);

    // Provided methods
    fn error_if_not_mergeable(&self, other: &Self) { ... }
    fn merge_with_multiple(&mut self, others: ManagedVec<M, Self>)
       where Self: Sized + ManagedVecItem { ... }
}
Expand description

Used for types that can be merged locally.

Required Methods§

source

fn can_merge_with(&self, other: &Self) -> bool

source

fn merge_with(&mut self, other: Self)

Provided Methods§

source

fn error_if_not_mergeable(&self, other: &Self)

source

fn merge_with_multiple(&mut self, others: ManagedVec<M, Self>)
where Self: Sized + ManagedVecItem,

Object Safety§

This trait is not object safe.

Implementors§