Crates.io | as-method |
lib.rs | as-method |
version | 0.1.0 |
source | src |
created_at | 2024-01-30 14:13:09.412157 |
updated_at | 2024-01-30 14:13:09.412157 |
description | Call function using the method syntax! |
homepage | |
repository | https://github.com/mu001999/as-method |
max_upload_size | |
id | 1120271 |
size | 5,470 |
Call function using the method syntax!
mod a {
use as_method::as_method;
#[as_method]
pub fn foo<T: std::fmt::Debug>(x: impl std::fmt::Debug, y: T) {
println!("{x:?}, {y:?}");
}
}
use a::foo;
fn main() {
1.foo(2);
}