pub struct HandlerSignature {
pub name: String,
pub params: Vec<HandlerParam>,
pub return_type: Option<HandlerReturnType>,
pub has_context: bool,
pub message_param: Option<HandlerParam>,
}Expand description
Parsed handler function signature.
Fields§
§name: StringHandler function name.
params: Vec<HandlerParam>All parameters.
return_type: Option<HandlerReturnType>Return type (if any).
has_context: boolWhether the handler has a RingContext parameter.
message_param: Option<HandlerParam>The message parameter (if any).
Implementations§
Source§impl HandlerSignature
impl HandlerSignature
Sourcepub fn parse(func: &ItemFn, type_mapper: &TypeMapper) -> Result<Self>
pub fn parse(func: &ItemFn, type_mapper: &TypeMapper) -> Result<Self>
Parse a handler function signature.
Sourcepub fn has_response(&self) -> bool
pub fn has_response(&self) -> bool
Check if the handler produces a response.
Sourcepub fn extra_params(&self) -> Vec<&HandlerParam>
pub fn extra_params(&self) -> Vec<&HandlerParam>
Get non-context, non-message parameters (additional kernel params).
Trait Implementations§
Source§impl Clone for HandlerSignature
impl Clone for HandlerSignature
Source§fn clone(&self) -> HandlerSignature
fn clone(&self) -> HandlerSignature
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HandlerSignature
impl RefUnwindSafe for HandlerSignature
impl Send for HandlerSignature
impl Sync for HandlerSignature
impl Unpin for HandlerSignature
impl UnwindSafe for HandlerSignature
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