as-method

Crates.ioas-method
lib.rsas-method
version0.1.0
sourcesrc
created_at2024-01-30 14:13:09.412157
updated_at2024-01-30 14:13:09.412157
descriptionCall function using the method syntax!
homepage
repositoryhttps://github.com/mu001999/as-method
max_upload_size
id1120271
size5,470
(mu001999)

documentation

README

as-method

Call function using the method syntax!

Example

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);
}
Commit count: 0

cargo fmt