Struct ast_description_lang::NamedSet
source · [−]pub struct NamedSet<'ni, T: NamedItem<'ni>>(_);
Implementations
sourceimpl<'ni, T: NamedItem<'ni>> NamedSet<'ni, T>
impl<'ni, T: NamedItem<'ni>> NamedSet<'ni, T>
pub fn insert(&mut self, item: T) -> bool
pub fn get(&self, name: T::Name) -> Option<&T>
pub fn get_index(&self, index: usize) -> Option<&T>
pub fn index_of(&self, name: T::Name) -> Option<usize>
pub fn contains(&self, name: T::Name) -> bool
pub fn iter(&'ni self) -> impl Iterator<Item = &'ni T> + 'ni
Trait Implementations
sourceimpl<'de, 'ni, T> Deserialize<'de> for NamedSet<'ni, T> where
'de: 'ni,
T: NamedItem<'ni>,
<T as NamedItem<'ni>>::Name: Deserialize<'de>,
<T as NamedItem<'ni>>::Unnamed: Deserialize<'de>,
impl<'de, 'ni, T> Deserialize<'de> for NamedSet<'ni, T> where
'de: 'ni,
T: NamedItem<'ni>,
<T as NamedItem<'ni>>::Name: Deserialize<'de>,
<T as NamedItem<'ni>>::Unnamed: Deserialize<'de>,
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'ni, T: NamedItem<'ni>> FromIterator<(<T as NamedItem<'ni>>::Name, <T as NamedItem<'ni>>::Unnamed)> for NamedSet<'ni, T>
impl<'ni, T: NamedItem<'ni>> FromIterator<(<T as NamedItem<'ni>>::Name, <T as NamedItem<'ni>>::Unnamed)> for NamedSet<'ni, T>
sourceimpl<'ni, T: NamedItem<'ni>> FromIterator<T> for NamedSet<'ni, T>
impl<'ni, T: NamedItem<'ni>> FromIterator<T> for NamedSet<'ni, T>
sourcefn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
Auto Trait Implementations
impl<'ni, T> RefUnwindSafe for NamedSet<'ni, T> where
T: RefUnwindSafe,
impl<'ni, T> Send for NamedSet<'ni, T> where
T: Send,
impl<'ni, T> Sync for NamedSet<'ni, T> where
T: Sync,
impl<'ni, T> Unpin for NamedSet<'ni, T> where
T: Unpin,
impl<'ni, T> UnwindSafe for NamedSet<'ni, T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more