Skip to main content

Crate protovalidate_buffa_macros

Crate protovalidate_buffa_macros 

Source
Expand description

#[connect_impl] โ€” validates the request view at the top of every Connect service handler method in an impl block whose request parameter is an OwnedView<_> or connectrpc::ServiceRequest<'_, _>. Single-site safety net: add it once to the service impl and every present-and-future handler is validated on entry.

Validation borrows OwnedView::reborrow() or ServiceRequest::view() and requires Validate on the generated view type. It does not convert the request to an owned message.

Non-handler async fns inside the same impl block are left alone (they lack a recognized request parameter, so the macro skips them).

Attribute Macrosยง

connect_impl