Owned by default
If foo uses/produces owned data by default, use:
- The
_ref suffix (e.g. foo_ref) for the immutably borrowed variant.
- The
_mut suffix (e.g. foo_mut) for the mutably borrowed variant.
Exceptions
For mutably borrowed variants, if the mut qualifier is part of a
type name (e.g. as_mut_slice), it should appear as it would appear
in the type.
I interpret mut_slice_from as saying ‘take a mutable slice from …’, in the same way that as_mut_slice is ‘as a mutable slice’. This makes me think that according to these rules, it should be mut_slice_from.