Open kjvalencik opened 3 years ago
Replaces https://github.com/neon-bindings/rfcs/issues/6
Proc macros might allow creating classes as wrappers around the JsBox concept. For example:
JsBox
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.
MemorySession
RedisSession
Proc macro for classes
Replaces https://github.com/neon-bindings/rfcs/issues/6
Proc macros might allow creating classes as wrappers around the
JsBox
concept. For example:A use case to keep in my is re-using implementations. For example, a user might have both
MemorySession
and aRedisSession
classes that share implementations. These should be friendly to generics and re-using the base class.