synstructure_test_traits-0.1.0/Cargo.toml.orig010066400017500001750000000004401322505311100200300ustar0000000000000000[package] # A nice long awkward name so it doesn't conflict with things on crates.io. name = "synstructure_test_traits" version = "0.1.0" description = "Helper test traits for synstructure doctests" license = "MIT" authors = ["Nika Layzell "] [lib] path = "lib.rs" synstructure_test_traits-0.1.0/Cargo.toml0000644000000013400000000000000143040ustar00# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g. crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] name = "synstructure_test_traits" version = "0.1.0" authors = ["Nika Layzell "] description = "Helper test traits for synstructure doctests" license = "MIT" [lib] path = "lib.rs" synstructure_test_traits-0.1.0/lib.rs010066400017500001750000000011531322503052100162570ustar0000000000000000//! This crate contains a series of traits which are occasionally referred to in //! documentation examples. When these examples reference the example_traits //! crate, they are referencing this crate. // Used for the WalkFields example in src/lib.rs pub trait WalkFields: std::any::Any { fn walk_fields(&self, walk: &mut FnMut(&WalkFields)); } impl WalkFields for i32 { fn walk_fields(&self, _walk: &mut FnMut(&WalkFields)) {} } // Used for the Interest example in src/lib.rs pub trait Interest { fn interesting(&self) -> bool; } impl Interest for i32 { fn interesting(&self) -> bool { *self > 0 } }