[][src]Struct runestick::Names

pub struct Names { /* fields omitted */ }

A tree of names.

Implementations

impl Names[src]

pub fn new() -> Self[src]

Construct a collection of names.

pub fn insert<I>(&mut self, iter: I) -> bool where
    I: IntoIterator,
    I::Item: Into<Component>, 
[src]

Insert the given item as an import.

Examples

use runestick::Names;

let mut names = Names::new();
assert!(!names.contains(&["test"]));
assert!(names.insert(&["test"]));
assert!(names.contains(&["test"]));
assert!(!names.insert(&["test"]));

pub fn contains<I>(&self, iter: I) -> bool where
    I: IntoIterator,
    I::Item: Into<Component>, 
[src]

Test if the given import exists.

Examples

use runestick::Names;

let mut names = Names::new();
assert!(!names.contains(&["test"]));
assert!(names.insert(&["test"]));
assert!(names.contains(&["test"]));
assert!(!names.insert(&["test"]));

pub fn contains_prefix<I>(&self, iter: I) -> bool where
    I: IntoIterator,
    I::Item: Into<Component>, 
[src]

Test if we contain the given prefix.

pub fn iter_components<I>(&self, iter: I) -> impl Iterator<Item = &Component> where
    I: IntoIterator,
    I::Item: Into<Component>, 
[src]

Iterate over all known components immediately under the specified iter path.

Trait Implementations

impl Debug for Names[src]

impl Default for Names[src]

Auto Trait Implementations

impl RefUnwindSafe for Names

impl Send for Names

impl Sync for Names

impl Unpin for Names

impl UnwindSafe for Names

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,