[−][src]Struct runestick::Names
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]
I: IntoIterator,
I::Item: Into<Component>,
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]
I: IntoIterator,
I::Item: Into<Component>,
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]
I: IntoIterator,
I::Item: Into<Component>,
Test if we contain the given prefix.
pub fn iter_components<'a, I>(
&'a self,
iter: I
) -> impl Iterator<Item = &'a Component> where
I: IntoIterator,
I::Item: Into<Component>,
[src]
&'a self,
iter: I
) -> impl Iterator<Item = &'a Component> where
I: IntoIterator,
I::Item: Into<Component>,
Iterate over all known components immediately under the specified iter
path.
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,