Open
Description
Proc macro for classes
Replaces #6
Proc macros might allow creating classes as wrappers around the JsBox
concept. For example:
struct MyClass {}
impl neon::JsClass for MyClass {
fn init(cx: FunctionContext) -> Self { todo!() }
}
#[neon::class]
impl MyClass {
#[neon::class_method(name = "myMethod")]
my_method(cx: FunctionContext) -> Self {}
}
A use case to keep in my is re-using implementations. For example, a user might have both MemorySession
and a RedisSession
classes that share implementations. These should be friendly to generics and re-using the base class.
Metadata
Metadata
Assignees
Labels
No labels