Skip to main content

Crate _01_places

Crate _01_places 

Source
Expand description

Modules§

basic_impls 🔒
projection 🔒
place_ops 🔒

Macros§

mk_field_proj
Make a unit struct that represents the projection to a particular struct field. Only works for sized types.
p
Macro that simulates the proposed new syntax. Derefs must be explicit and the identifiers used for field projections must actually be values of some Projection type, e.g. built with mk_field_proj.

Structs§

NoopProj
SizedProj
Sized projection that holds only an offset.
ComposeProj
Projection P followed by Q. P may be unsized.

Enums§

BorrowKind

Traits§

Projection
ProjectionExt
HasPlace
PlaceBorrow
Borrow a subplace.
PlaceRead
Read a value from a subplace.
PlaceWrite
Write to a subplace.
PlaceMove
Allows moving a value out of a subplace. This uses PlaceRead::read to read the value.
PlaceDeref
Allows dereferencing a subplace that contains a pointer. The returned pointer will only be used for further place operations.
PlaceDrop
Drop the contents of a subplace.
DropHusk
Clean up a pointer whose contained place has been moved out of/dropped.
PlaceCoerce
If at a coercion site an expression e has type T but type U was expected, and T: HasPlace and T::Target: PlaceCoerce<T>, then we replace e with @T::Target::Output **e and repeat this until types match and raise an error otherwise.
PlaceWrap
If X: PlaceWrap and X::Target has a field field, then X itself acquires a virtual field named field as well. That field has type <X as PlaceWrap<proj_ty!(X::Target.field)>>::WrappedProj::Target, and WrappedProj is the projection used when we refer to that field.