[−][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: IntoComponent,
[src]
I: IntoIterator,
I::Item: IntoComponent,
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: IntoComponent,
[src]
I: IntoIterator,
I::Item: IntoComponent,
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: IntoComponent,
[src]
I: IntoIterator,
I::Item: IntoComponent,
Test if we contain the given prefix.
pub fn iter_components<'a, I: 'a>(
&'a self,
iter: I
) -> impl Iterator<Item = ComponentRef<'a>> + 'a where
I: IntoIterator,
I::Item: IntoComponent,
[src]
&'a self,
iter: I
) -> impl Iterator<Item = ComponentRef<'a>> + 'a where
I: IntoIterator,
I::Item: IntoComponent,
Iterate over all known components immediately under the specified iter
path.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Names
[src]
impl Send for Names
[src]
impl Sync for Names
[src]
impl Unpin for Names
[src]
impl UnwindSafe for Names
[src]
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,
pub 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,