diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-03-20 02:43:53 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-19 22:13:53 +0100 |
commit | 7c2722201e0b89bc6d80ab27413573add87d2cff (patch) | |
tree | 403f008992c29da380b96ea0a4e93af88cc0dc6a | |
parent | 52459faf0b35ed157bb640d24c6107e1ff00aded (diff) |
chore(ops): hide implementation details from rustdoc (#14038)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
-rw-r--r-- | ops/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ops/lib.rs b/ops/lib.rs index 4a24b6e33..9add40a9e 100644 --- a/ops/lib.rs +++ b/ops/lib.rs @@ -57,11 +57,17 @@ pub fn op(_attr: TokenStream, item: TokenStream) -> TokenStream { codegen_v8_sync(&core, &func) }; + let docline = format!("Use `{name}::decl()` to get an op-declaration"); // Generate wrapper quote! { #[allow(non_camel_case_types)] + #[doc="Auto-generated by `deno_ops`, i.e: `#[op]`"] + #[doc=""] + #[doc=#docline] + #[doc="you can include in a `deno_core::Extension`."] pub struct #name; + #[doc(hidden)] impl #name { pub fn name() -> &'static str { stringify!(#name) |