Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Lifecycle support for R package deprecation management.

This module provides integration with R’s lifecycle package for managing experimental, deprecated, and superseded functions.

§Usage

Mark functions with lifecycle attributes:

// Using Rust's deprecated attribute
#[deprecated(since = "0.4.0", note = "Use new_fn() instead")]
#[miniextendr]
pub fn old_fn(x: i32) -> i32 { x }

// Using miniextendr's lifecycle attribute
#[miniextendr(lifecycle = "experimental")]
pub fn new_fn(x: i32) -> i32 { x * 2 }

§Lifecycle Stages

  • experimental: Function is experimental and may change without notice
  • stable: Function is stable (default, no badge/warning needed)
  • superseded: Function has a better alternative but will be maintained
  • deprecated: Function should no longer be used and may be removed
  • defunct: Function no longer works and throws an error

Structs§

LifecycleSpec
Full lifecycle specification for a function or method.

Enums§

LifecycleStage
Lifecycle stage for a function, method, or argument.

Functions§

collect_lifecycle_imports
Collect the @importFrom lifecycle ... roxygen tag needed for a set of lifecycle specs.
inject_lifecycle_badge
Inject lifecycle badge into roxygen tags if not already present.
inject_lifecycle_imports
Inject @importFrom lifecycle roxygen tags for the signal function and badge.
parse_lifecycle_attr
Parse lifecycle spec from miniextendr attribute arguments.
parse_rust_deprecated
Extract lifecycle info from a #[deprecated] attribute.