1 unstable release

0.1.0 May 24, 2023

#1958 in Procedural macros

Download history 13/week @ 2024-02-23 6/week @ 2024-03-01 40/week @ 2024-03-22 14/week @ 2024-03-29 1/week @ 2024-04-05

55 downloads per month

MIT license

435KB
15K SLoC

SSTTT

More Syn Syntax Tree Traversal Trait

GitHub Crates.io docs.rs

SSTTT crate provide some useful trait for syn syntax tree traversal.

Example

fallible Fold

pub trait TryFold {
    type Error;

    fn try_fold_abi(&mut self, t: syn::Abi) -> Result<syn::Abi, Self::Error>
    {
        try_fold_abi(self, t)
    }

    // ...
}

fallible take (like fold but without return new value)

pub trait TryTake {
    type Error;

    fn try_take_abi(&mut self, t: syn::Abi) -> Result<(), Self::Error> {
        try_take_abi(self, t)
    }

    // ...
}

Dependencies

~335–770KB
~19K SLoC