#macro #boilerplate #remove #conversion #user #easegress-object #easegress-sdk

macro easegress-macros

Macros to support the easegress-sdk crate and remove FFI boilerplate / conversion from user code

2 releases

0.1.1 Mar 6, 2023
0.1.0 Feb 24, 2023

#88 in #remove

Apache-2.0

7KB
112 lines

#[easegress_object] can only be used on your struct and the implementation of the Program trait for your struct.

Examples

#[easegress_object]
struct Fake;

#[easegress_object]
impl Program for Fake {
    fn new(_param: std::collections::HashMap<String, String>) -> Self {
        Self {}
    }

    fn run(&self) -> i32 {
        0
    }
}

Errors

#[easegress_object]
fn fake() {}

Dependencies

~1.5MB
~37K SLoC