Crate easegress_macros

source ·
Expand description

#[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() {}

Attribute Macros