pub struct RawMutOf<Expr>(pub Expr);Expand description
Uses the &raw must syntax to get a pointer from another pointer. For example:
let pointer_var = Str("ptr");
let let_stmt = LetStmt(pointer_var, RawMutOf(FieldAccess(Str("packed"), Str("field1"))));
let string = InMemoryOutput::print_output(EmptyContext, &let_stmt);
assert_eq!("let ptr = &raw mut packed.field1;\n", string);Tuple Fields§
§0: ExprTrait Implementations§
Auto Trait Implementations§
impl<Expr> Freeze for RawMutOf<Expr>where
Expr: Freeze,
impl<Expr> RefUnwindSafe for RawMutOf<Expr>where
Expr: RefUnwindSafe,
impl<Expr> Send for RawMutOf<Expr>where
Expr: Send,
impl<Expr> Sync for RawMutOf<Expr>where
Expr: Sync,
impl<Expr> Unpin for RawMutOf<Expr>where
Expr: Unpin,
impl<Expr> UnwindSafe for RawMutOf<Expr>where
Expr: 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