pub fn insert<I>(&mut self, iter: I) -> bool
    where
        I: IntoIterator,
        I::Item: IntoComponent,
    {
        let mut current = &mut self.root;

        for c in iter {
            current = current.children.entry(c.into_component()).or_default();
        }

        mem::replace(&mut current.term, true)
    }
/// Insert the given item as an import.
///
/// # Examples
///
/// ```rust
/// use runestick::Names;
///
/// let mut names = Names::new();
/// assert!(!names.contains(&["test"]));
/// assert!(!names.insert(&["test"]));
/// assert!(names.contains(&["test"]));
/// assert!(names.insert(&["test"]));
/// ```
Insert the given item as an import.
Insert the given item as an import .
pub fn insert<I>(&mut self, iter: I) -> bool
    where
        I: IntoIterator,
        I::Item: IntoComponent,
    {
        let mut current = &mut self.root;
        for c in iter {
            current = current.children.entry(c.into_component()).or_default();
        }
        mem::replace(&mut current.term, true)
    }
pub fn insert < I > ( & mut self , iter : I ) -> bool where I : IntoIterator , I :: Item : IntoComponent , { let mut current = & mut self . root ; for c in iter { current = current . children . entry ( c . into_component ( ) ) . or_default ( ) ; } mem :: replace ( & mut current . term , true ) }
Insert the given item as an import.
Insert the given item as an import .
&mut self
iter
I
&mut self
iter
I
examples
```rust
use runestick::Names.


` ` ` rust use runestick :: Names .