starina_api

Module prelude

Source
Expand description

Frequently used types and traits.

This module contains the most common types and traits to import. Here is an idiomatic way to import the prelude:

use starina_api::prelude::*;

let mut v = Vec::new();
v.push(1);

§What’s in the prelude?

Since Starina apps are #![no_std] crates, this prelude includes types from alloc so that experienced Rust programmers can use familiar types without asking “Where is Vec?”.

§Why should I use the prelude?

You don’t have to use the prelude. However, it’s a convenient way to reduce the number of your keystrokes.

Modules§

  • A contiguous growable array type with heap-allocated contents, written Vec<T>.

Macros§

Structs§

  • A pointer type that uniquely owns a heap allocation of type T.
  • A UTF-8–encoded, growable string.
  • A contiguous growable array type, written as Vec<T>, short for ‘vector’.

Traits§

  • A generalization of Clone to borrowed data.
  • A trait for converting a value to a String.