aptos-iterable-derive 0.0.1

Derives `IntoIterator` implementations and iterator methods for single-field tuple structs
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 14.48 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 291.38 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • aptos-crates

Aptos Iterable Derive

Crates.io docs.rs

Derives IntoIterator implementations and iterator methods for single-field tuple structs.

Usage

use aptos_iterable_derive::Iterable;
use std::collections::HashMap;

#[derive(Iterable)]
struct Config(HashMap<String, String>);

let config = Config(HashMap::new());

// Use in for loops
for (key, value) in &config { }

// Or iter() and iter_mut()
config.iter();

The struct must be a tuple struct with exactly one field that implements IntoIterator.