pub struct ItemContext<'a> {
pub thecrate: &'a TokenStream,
pub package: Option<&'a LiteralString>,
pub module: Option<&'a Ident>,
pub address_map: &'a HashMap<Ident, TokenStream>,
}Expand description
Context for Rust code generation from a Move item.
Fields§
§thecrate: &'a TokenStreamPath to a crate/module which exports:
- a
typesmodule withAddressandU256types frommoverox-types - a
traitsmodule withHasKey,MoveDatatypeandMoveTypetraits frommoverox-traits - the
serdecrate - an
Otwtype
package: Option<&'a LiteralString>Move package address as an 0x-prefixed hex string.
module: Option<&'a Ident>Move module name.
address_map: &'a HashMap<Ident, TokenStream>Mapping of Move named addresses to Rust paths.
Used to map Move datatype paths to Rust-equivalents.
Trait Implementations§
Source§impl<'a> Clone for ItemContext<'a>
impl<'a> Clone for ItemContext<'a>
Source§fn clone(&self) -> ItemContext<'a>
fn clone(&self) -> ItemContext<'a>
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 moreimpl<'a> Copy for ItemContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for ItemContext<'a>
impl<'a> RefUnwindSafe for ItemContext<'a>
impl<'a> !Send for ItemContext<'a>
impl<'a> !Sync for ItemContext<'a>
impl<'a> Unpin for ItemContext<'a>
impl<'a> UnwindSafe for ItemContext<'a>
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