Skip to main content

Crate veclite

Crate veclite 

Source
Expand description

§veclite

A lightweight, ergonomic wrapper around Rust’s Vec<T> that implements Display for easy printing, and provides extra list-like utility methods. Veclite also does not need std, and so can run without an operating system.

§Features

  • Implements Display for space-separated formatting
  • Retains all Vec<T> methods via Deref
  • Adds .prepend() for list-style front insertion
  • Short alias Vel for ergonomic use
  • vel![] macro for concise construction

§Example

use veclite::vel;
let mut v = vel![1, 2, 3];
v.push(4);       // Vec method
v.prepend(0);    // Custom method
println!("{}", v); // prints: 0 1 2 3 4

Macros§

vel
Macro to construct a Vel<T> just like vec![], including empty construction.

Structs§

Veclite
A lightweight wrapper around Vec<T> that implements Display for space-separated formatting, and provides ergonomic list-like utilities.

Type Aliases§

Vel
Short alias for Veclite<T>, for ergonomic use.