[−][src]Struct lark_ty::Generics
A set of generic arguments; e.g., in a type like Vec<i32>
, this
would be [i32]
.
Methods
impl<F: TypeFamily> Generics<F>
[src]
pub fn empty() -> Self
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn is_not_empty(&self) -> bool
[src]
pub fn len(&self) -> usize
[src]
pub fn iter(
&self
) -> impl Iterator<Item = Generic<F>> + '_
[src]
&self
) -> impl Iterator<Item = Generic<F>> + '_
pub fn elements(&self) -> &[Generic<F>]
[src]
pub fn push(&mut self, generic: Generic<F>)
[src]
Append an item to this vector; if this set of generics is shared, this will clone the contents so that we own them privately. (Effectively generic lists are a copy-on-write data structure.)
Trait Implementations
impl<S, T> Map<S, T> for Generics<S> where
S: TypeFamily,
T: TypeFamily,
[src]
S: TypeFamily,
T: TypeFamily,
impl<F> Extend<GenericKind<Ty<F>>> for Generics<F> where
F: TypeFamily,
[src]
F: TypeFamily,
Append items to this generics, cloning if it is shared with others. (Generics are effectively a simple persistent vector.)
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = Generic<F>>,
[src]
T: IntoIterator<Item = Generic<F>>,
impl<F: PartialEq + TypeFamily> PartialEq<Generics<F>> for Generics<F>
[src]
impl<F: Eq + TypeFamily> Eq for Generics<F>
[src]
impl<F: Clone + TypeFamily> Clone for Generics<F>
[src]
fn clone(&self) -> Generics<F>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<F: TypeFamily, 'iter> IntoIterator for &'iter Generics<F>
[src]
type IntoIter = Cloned<Iter<'iter, Generic<F>>>
Which kind of iterator are we turning this into?
type Item = Generic<F>
The type of the elements being iterated over.
fn into_iter(self) -> Self::IntoIter
[src]
impl<F: Debug + TypeFamily> Debug for Generics<F>
[src]
impl<F: Hash + TypeFamily> Hash for Generics<F>
[src]
fn hash<__HF: Hasher>(&self, state: &mut __HF)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<F> Index<BoundVar> for Generics<F> where
F: TypeFamily,
[src]
F: TypeFamily,
type Output = Generic<F>
The returned type after indexing.
fn index(&self, index: BoundVar) -> &Self::Output
[src]
impl<F: TypeFamily> FromIterator<GenericKind<Ty<F>>> for Generics<F>
[src]
fn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = Generic<F>>,
[src]
T: IntoIterator<Item = Generic<F>>,
impl<F: TypeFamily> DebugWith for Generics<F>
[src]
fn fmt_with<Cx: ?Sized>(&self, cx: &Cx, fmt: &mut Formatter) -> Result
[src]
fn debug_with<Cx>(&'me self, cx: &'me Cx) -> DebugCxPair<'me, &'me Self, Cx> where
Cx: ?Sized,
[src]
Cx: ?Sized,
fn into_debug_with<Cx>(self, cx: &'me Cx) -> DebugCxPair<'me, Self, Cx> where
Cx: ?Sized,
[src]
Cx: ?Sized,
Auto Trait Implementations
impl<F> Send for Generics<F> where
<F as TypeFamily>::Base: Send + Sync,
<F as TypeFamily>::Perm: Send + Sync,
<F as TypeFamily>::Repr: Send + Sync,
<F as TypeFamily>::Base: Send + Sync,
<F as TypeFamily>::Perm: Send + Sync,
<F as TypeFamily>::Repr: Send + Sync,
impl<F> Sync for Generics<F> where
<F as TypeFamily>::Base: Send + Sync,
<F as TypeFamily>::Perm: Send + Sync,
<F as TypeFamily>::Repr: Send + Sync,
<F as TypeFamily>::Base: Send + Sync,
<F as TypeFamily>::Perm: Send + Sync,
<F as TypeFamily>::Repr: Send + Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<Cx, T> FmtWithSpecialized for T where
Cx: ?Sized,
T: Debug + ?Sized,
[src]
Cx: ?Sized,
T: Debug + ?Sized,