Trait multiversx_sc_snippets::imports::Mergeable
source · pub trait Mergeable<M>where
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§
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,
Object Safety§
This trait is not object safe.