Skip to main content

FunctionSkeleton

Trait FunctionSkeleton 

Source
pub trait FunctionSkeleton {
    // Required methods
    fn service_name(&self) -> &str;
    fn operations(&self) -> &[(&'static str, u32)];
}
Expand description

Skeleton trait: every generated service-side dispatch implements it. The skeleton unpacks the request discriminator, calls the matching operation in the user implementation and packs the reply back as a union.

Required Methods§

Source

fn service_name(&self) -> &str

Service name.

Source

fn operations(&self) -> &[(&'static str, u32)]

List of all operations this skeleton accepts. Each entry is (operation_name, opcode). Opcodes are assigned monotonically and automatically at codegen time (Spec §7.2.2.1).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§