XU XUv0.8.8
中文

Docs / Language

Memory

An owning value has one owner. Pass/return/store by value moves. Drop is deterministic at end of scope. Use-after-move is a compile error.

FormMeaning
by-value string / []Tmove
&xshared borrow
mut &x (x must be mut)exclusive borrow
*rderef a scalar (writes need &mut)

While a shared borrow is live you cannot write / move / take &mut. There is no unsafe keyword. Hosted targets reject volatile stores to arbitrary addresses.

File and Conn are affine resources: moves transfer ownership and scope exit closes them. Their native handles are package-private. Borrow the resource for I/O and observe explicit EOF/error data and write-progress results when using the progress APIs.

I/O API · OS API