Benign crates 552 installs Download

amethystate-macros 0.20.1

“A state manager for Rust applications”

Rust proc macro entrypointRust replaces matched string content
SHA-2566f479d1cc55d2d45414f616fc582305b7b92dbff917070475c3356a4042c7224

Evidence

imports crate::amethystate::amethystate_crate_path migrate.rs · lines 1–21
1use quote::{quote, quote_spanned};
2use syn::spanned::Spanned;
3use syn::{
4 FnArg, Ident, ItemFn, PatType, ReturnType, Token, Type,
5 parse::{Parse, ParseStream},
6 parse_macro_input,
7 punctuated::Punctuated,
8};
9
10use crate::amethystate::amethystate_crate_path;
11
12struct RenameMeta {
13 old: Ident,
14 _arrow: Token![=>],
15 new: Ident,
16}
17
18impl Parse for RenameMeta {
19 fn parse(input: ParseStream) -> syn::Result<Self> {
20 Ok(Self {
21 …
target_version-style identifier migrate.rs · lines 196–199
196:38… e_name::migration::fields::AmeStateFields>::ID,
197 target_version: <#new_ty as #crate_name::migration::fields::AmeStateFields>::VERSION,
198 description: #description,
199 …
assert! macro migrate.rs · lines 227–234
227:5… #crate_name::inventory::submit! { #entry }
228 }
229 };
230
231 let one_line = quote_spanned! { old_ty.span() =>
232 const _: () = ::core::assert!(
233 #crate_name::migration::fields::same_line(
234 <#old_ty as #crate_name …
Rust replaces matched string content naming.rs · lines 21–26
21:52… word.is_empty());
22
23 Some(match rule {
24 "lowercase" => named.replace('_', "").to_lowercase(),
25 "UPPERCASE" => named.replace('_', "").to_uppercase(),
26 "snake_case" => named.to_string( …
English function-word token "the" lib.rs · lines 5–11
5:11… ping;
6
7/// Generates a persistent state wrapper for a struct.
8///
9/// This macro creates structures that manage persistence, reactive subscribers,
10/// and migrations. Depending on the selected `mode`, it generates either reactive
11/// `Field<T>` accessors or a flat persistent-onl …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.