Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The view function @

Syntax

view_expr ::= spec_expr @

Desugaring

The expression expr@ desugars to the expression expr.view(), which is resolved as normal via Rust’s method resolution. This usually, but not always, resolves to the view method defined by the View trait.

Examples

By convention, the view() function is spec function for the abstraction of an exec-mode object. See, for example: