pub struct TypeMapping {
pub mapping_token: mapping,
pub paren_token: Paren,
pub key: Box<Type>,
pub key_name: Option<SolIdent>,
pub fat_arrow_token: FatArrow,
pub value: Box<Type>,
pub value_name: Option<SolIdent>,
}
Expand description
A mapping type: mapping(uint key => string value)
Fields§
§mapping_token: mapping
§paren_token: Paren
§key: Box<Type>
§key_name: Option<SolIdent>
§fat_arrow_token: FatArrow
§value: Box<Type>
§value_name: Option<SolIdent>
Implementations§
Source§impl TypeMapping
impl TypeMapping
Sourcepub fn key_var(&self) -> VariableDeclaration
pub fn key_var(&self) -> VariableDeclaration
Returns a VariableDeclaration
corresponding to this mapping’s key.
Sourcepub fn value_var(&self) -> VariableDeclaration
pub fn value_var(&self) -> VariableDeclaration
Returns a VariableDeclaration
corresponding to this mapping’s value.
Trait Implementations§
Source§impl Clone for TypeMapping
impl Clone for TypeMapping
Source§fn clone(&self) -> TypeMapping
fn clone(&self) -> TypeMapping
Returns a copy 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 Debug for TypeMapping
impl Debug for TypeMapping
Source§impl Display for TypeMapping
impl Display for TypeMapping
Source§impl Hash for TypeMapping
impl Hash for TypeMapping
Source§impl Parse for TypeMapping
impl Parse for TypeMapping
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl PartialEq for TypeMapping
impl PartialEq for TypeMapping
Source§impl Spanned for TypeMapping
impl Spanned for TypeMapping
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.impl Eq for TypeMapping
Auto Trait Implementations§
impl Freeze for TypeMapping
impl RefUnwindSafe for TypeMapping
impl !Send for TypeMapping
impl !Sync for TypeMapping
impl Unpin for TypeMapping
impl UnwindSafe for TypeMapping
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)