type-toppings

Crates.iotype-toppings
lib.rstype-toppings
version0.1.1
sourcesrc
created_at2023-11-08 20:24:47.697658
updated_at2023-11-14 08:01:42.73915
descriptionOpinionated extensions to standard types
homepage
repositoryhttps://github.com/plul/type-toppings
max_upload_size
id1029387
size30,969
Asger Juul Brunshøj (plul)

documentation

README

Type Toppings

Opinionated collection of utility extensions for several of Rust's standard types, including:

  • Result
  • Iterator
  • futures::Steam

Documentation

https://docs.rs/type-toppings/latest/type_toppings/

Example

use type_toppings::IteratorExt;

// Map only the Some values in an iterator of Option<T>:
let data: Vec<_> = vec![Some(1), None, Some(3)]
   .into_iter()
   .map_opt(|x| x * 2)
   .collect();
Commit count: 6

cargo fmt