Macro htrpc::htrpc_entry_point
source · macro_rules! htrpc_entry_point { ($($segment:tt),*) => { ... }; }
Expand description
A helper macro to construct an EntryPoint
instance.
Examples
use htrpc::types::{EntryPoint, PathSegment};
static SEGMENTS: &[PathSegment] =
&[PathSegment::Val("foo"), PathSegment::Var, PathSegment::Val("baz")];
let p0 = EntryPoint::new(SEGMENTS);
let p1 = htrpc_entry_point!["foo", _, "baz"];
assert_eq!(p0, p1);