Skip to main content

Merge

Trait Merge 

Source
trait Merge: AstNode + Clone {
    // Required methods
    fn try_merge(&self, other: &Self, cfg: &InsertUseConfig) -> Option<Self>;
    fn into_either(self) -> Either<Use, UseTree>;

    // Provided method
    fn try_merge_from(
        self,
        items: &mut dyn Iterator<Item = Self>,
        cfg: &InsertUseConfig,
    ) -> Option<Vec<Edit>> { ... }
}

Required Methods§

Source

fn try_merge(&self, other: &Self, cfg: &InsertUseConfig) -> Option<Self>

Source

fn into_either(self) -> Either<Use, UseTree>

Provided Methods§

Source

fn try_merge_from( self, items: &mut dyn Iterator<Item = Self>, cfg: &InsertUseConfig, ) -> Option<Vec<Edit>>

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 Merge for Use

Source§

fn try_merge(&self, other: &Self, cfg: &InsertUseConfig) -> Option<Self>

Source§

fn into_either(self) -> Either<Use, UseTree>

Source§

impl Merge for UseTree

Source§

fn try_merge(&self, other: &Self, _: &InsertUseConfig) -> Option<Self>

Source§

fn into_either(self) -> Either<Use, UseTree>

Implementors§