[−][src]Struct runestick::Item
The name of an item.
This is made up of a collection of strings, like ["foo", "bar"]
.
This is indicated in rune as foo::bar
.
Implementations
impl Item
[src]
pub const fn empty() -> Self
[src]
Construct an empty item.
pub fn new(path: Vec<Component>) -> Self
[src]
Construct a new item path.
pub fn of<I>(iter: I) -> Self where
I: IntoIterator,
I::Item: Into<Component>,
[src]
I: IntoIterator,
I::Item: Into<Component>,
Construct a new item path.
pub fn is_empty(&self) -> bool
[src]
Check if the item is empty.
pub fn push<C>(&mut self, component: C) where
C: Into<Component>,
[src]
C: Into<Component>,
Push the given component to the current item.
pub fn pop(&mut self) -> Option<Component>
[src]
Push the given component to the current item.
pub fn as_vec(&self) -> Vec<Component>
[src]
Construct a new vector from the current item.
pub fn as_local(&self) -> Option<&str>
[src]
If the item only contains one element, return that element.
pub fn join<I>(&self, other: I) -> Self where
I: IntoIterator,
I::Item: Into<Component>,
[src]
I: IntoIterator,
I::Item: Into<Component>,
Join this path with another.
pub fn extended<C>(&self, part: C) -> Self where
C: Into<Component>,
[src]
C: Into<Component>,
Clone and extend the item path.
pub fn last(&self) -> Option<&Component>
[src]
Access the last component in the path.
Trait Implementations
impl Clone for Item
[src]
impl Debug for Item
[src]
impl Default for Item
[src]
impl Display for Item
[src]
impl Eq for Item
[src]
impl Hash for Item
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> IntoIterator for Item
[src]
type IntoIter = IntoIter<Component>
Which kind of iterator are we turning this into?
type Item = Component
The type of the elements being iterated over.
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a> IntoIterator for &'a Item
[src]
type IntoIter = Iter<'a, Component>
Which kind of iterator are we turning this into?
type Item = &'a Component
The type of the elements being iterated over.
fn into_iter(self) -> Self::IntoIter
[src]
impl Ord for Item
[src]
fn cmp(&self, other: &Item) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Item> for Item
[src]
impl PartialOrd<Item> for Item
[src]
fn partial_cmp(&self, other: &Item) -> Option<Ordering>
[src]
fn lt(&self, other: &Item) -> bool
[src]
fn le(&self, other: &Item) -> bool
[src]
fn gt(&self, other: &Item) -> bool
[src]
fn ge(&self, other: &Item) -> bool
[src]
impl StructuralEq for Item
[src]
impl StructuralPartialEq for Item
[src]
Auto Trait Implementations
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
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<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,