You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pub struct rustls_server_config_builder {
// We use the opaque struct pattern to tell C about our types without
// telling them what's inside.
// https://doc.rust-lang.org/nomicon/ffi.html#representing-opaque-structs
_private: [u8; 0],
}
impl CastPtr for rustls_server_config_builder {
type RustType = ServerConfig;
}
impl BoxCastPtr for rustls_server_config_builder {}
We should define a macro such that we can simply all this boilerplate to:
I started work on this. One significant problem is that if we put a doccomment above the macro call, rustdoc treats that as an attempt to document the macro call (which it doesn't support), rather than an attempt to document the first item generated by the macro call. Perhaps we need the macro to accept doccomments as part of its input.
We have a recurring pattern in this repository:
We should define a macro such that we can simply all this boilerplate to:
Or, to include BoxCastPtr:
We should make sure that doccomments right above the macro invocation wind up in crustls.h associated with the struct declaration.
The text was updated successfully, but these errors were encountered: