pub struct HandlerSignature {
pub fn_name: String,
pub fn_span: Span,
pub state_type: Option<Type>,
pub input_type: Option<Type>,
pub query_type: Option<Type>,
pub output_type: Type,
pub error_type: Option<Type>,
pub is_streaming: bool,
pub is_async: bool,
}Expand description
Fully analysed handler function signature.
Produced by extract_handler_signature. All fields are resolved against
the actual AST — no string-based type inference.
Fields§
§fn_name: StringThe function’s identifier, e.g. "list_planets".
fn_span: SpanSpan of the function identifier for error reporting.
state_type: Option<Type>The S in a State<S> parameter, if present.
input_type: Option<Type>The T in a Json<T> parameter, if present.
query_type: Option<Type>The T in a Query<T> parameter, if present.
output_type: TypeThe resolved output type:
Json<T>return →TResult<Json<T>, E>return →TSse<...>return → unit()(output type comes fromstream_eventattribute)
error_type: Option<Type>The E in Result<_, E>, if present.
is_streaming: boolWhether the handler returns Sse<...> (an SSE streaming response).
is_async: boolWhether the function is declared async.
Trait Implementations§
Auto Trait Implementations§
impl !Send for HandlerSignature
impl !Sync for HandlerSignature
impl Freeze for HandlerSignature
impl RefUnwindSafe for HandlerSignature
impl Unpin for HandlerSignature
impl UnsafeUnpin 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