pub struct MethodShorthandArgs {
pub path: String,
pub data: Option<String>,
}Expand description
Parsed arguments for method-specific shorthand macros like #[orpc::get("/path")].
Syntax: #[orpc::get("/path")] or #[orpc::post("/path", data = "StreamEvent")]
Fields§
§path: String§data: Option<String>Implementations§
Source§impl MethodShorthandArgs
Convert method shorthand args to standard OrpcArgs.
impl MethodShorthandArgs
Convert method shorthand args to standard OrpcArgs.
This allows method-specific macros like #[orpc::get("/path")] to reuse
all the existing codegen logic without duplication.
pub fn into_orpc_args(self, method: &str) -> OrpcArgs
Trait Implementations§
Source§impl Parse for MethodShorthandArgs
impl Parse for MethodShorthandArgs
fn parse(input: ParseStream<'_>) -> Result<Self>
Auto Trait Implementations§
impl Freeze for MethodShorthandArgs
impl RefUnwindSafe for MethodShorthandArgs
impl Send for MethodShorthandArgs
impl Sync for MethodShorthandArgs
impl Unpin for MethodShorthandArgs
impl UnsafeUnpin for MethodShorthandArgs
impl UnwindSafe for MethodShorthandArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more