pub struct CollectionEntry<K> { /* private fields */ }Expand description
Represents an entry in a collection used to build a frozen collection.
Implementations§
Source§impl<K> CollectionEntry<K>
impl<K> CollectionEntry<K>
Sourcepub const fn map_entry(
key: K,
key_expr: Expr,
value_expr: Expr,
) -> CollectionEntry<K>
pub const fn map_entry( key: K, key_expr: Expr, value_expr: Expr, ) -> CollectionEntry<K>
Creates a new CollectionEntry for a map, using the specified key, key expression, and value expression.
Sourcepub fn set_entry(value: K, value_expr: Expr) -> CollectionEntry<K>
pub fn set_entry(value: K, value_expr: Expr) -> CollectionEntry<K>
Creates a new CollectionEntry for a set, using the specified value and value expression.
Trait Implementations§
Source§impl<K> Clone for CollectionEntry<K>where
K: Clone,
impl<K> Clone for CollectionEntry<K>where
K: Clone,
Source§fn clone(&self) -> CollectionEntry<K>
fn clone(&self) -> CollectionEntry<K>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<K> Debug for CollectionEntry<K>where
K: Debug,
impl<K> Debug for CollectionEntry<K>where
K: Debug,
Source§impl<K> ToTokens for CollectionEntry<K>
impl<K> ToTokens for CollectionEntry<K>
Source§fn to_tokens(&self, tokens: &mut TokenStream)
fn to_tokens(&self, tokens: &mut TokenStream)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
Auto Trait Implementations§
impl<K> Freeze for CollectionEntry<K>where
K: Freeze,
impl<K> RefUnwindSafe for CollectionEntry<K>where
K: RefUnwindSafe,
impl<K> !Send for CollectionEntry<K>
impl<K> !Sync for CollectionEntry<K>
impl<K> Unpin for CollectionEntry<K>where
K: Unpin,
impl<K> UnsafeUnpin for CollectionEntry<K>where
K: UnsafeUnpin,
impl<K> UnwindSafe for CollectionEntry<K>where
K: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span covering the complete contents of this syntax tree
node, or Span::call_site() if this node is empty.