pub struct RoxygenBuilder {
name: Option<String>,
rdname: Option<String>,
title: Option<String>,
description: Option<String>,
source: Option<String>,
export: bool,
export_method: Option<String>,
method: Option<(String, String)>,
custom_tags: Vec<String>,
}Expand description
Builder for generating roxygen2 documentation tags.
Provides a fluent API for building common roxygen tag patterns used across all class systems.
§Example
let tags = RoxygenBuilder::new()
.name("Counter$increment")
.rdname("Counter")
.export()
.build();
// => vec!["#' @name Counter$increment", "#' @rdname Counter", "#' @export"]Fields§
§name: Option<String>Value for @name tag. Identifies the documented topic (e.g., "Counter$increment").
rdname: Option<String>Value for @rdname tag. Groups multiple entries onto a single help page
(e.g., all methods of "Counter" share one Rd file).
title: Option<String>Value for @title tag. The one-line title shown in help page headers.
description: Option<String>Value for @description tag. Longer description text below the title.
source: Option<String>Value for @source tag. Typically "Generated by miniextendr" provenance info.
export: boolWhether to emit @export. When true, the item is exported from the package NAMESPACE.
export_method: Option<String>Value for @exportMethod tag. Used for S4 method exports (e.g., "show").
method: Option<(String, String)>Values for @method tag as (generic, class). Used for S3 method dispatch
(e.g., ("print", "Counter") emits @method print Counter).
Additional custom tag lines emitted verbatim (without the #' prefix,
which is added during build). Used for tags like
@keywords internal or @param entries.
Implementations§
Source§impl RoxygenBuilder
impl RoxygenBuilder
Sourcepub fn rdname(self, rdname: impl Into<String>) -> Self
pub fn rdname(self, rdname: impl Into<String>) -> Self
Set the @rdname tag (groups docs into one page).
Sourcepub fn description(self, desc: impl Into<String>) -> Self
pub fn description(self, desc: impl Into<String>) -> Self
Set the @description tag.
Sourcepub fn source(self, source: impl Into<String>) -> Self
pub fn source(self, source: impl Into<String>) -> Self
Set the @source tag (typically “Generated by miniextendr…”).
Sourcepub fn export_method(self, method: impl Into<String>) -> Self
pub fn export_method(self, method: impl Into<String>) -> Self
Add @exportMethod tag (for S4).
Sourcepub fn method(
self,
generic: impl Into<String>,
class: impl Into<String>,
) -> Self
pub fn method( self, generic: impl Into<String>, class: impl Into<String>, ) -> Self
Add @method tag (for S3).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RoxygenBuilder
impl RefUnwindSafe for RoxygenBuilder
impl Send for RoxygenBuilder
impl Sync for RoxygenBuilder
impl Unpin for RoxygenBuilder
impl UnsafeUnpin for RoxygenBuilder
impl UnwindSafe for RoxygenBuilder
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
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
sized_type_properties)[Self]. Read moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 224 bytes