pub enum LifecycleStage {
Experimental,
Stable,
Superseded,
SoftDeprecated,
Deprecated,
Defunct,
}Expand description
Lifecycle stage for a function, method, or argument.
Variants§
Experimental
Function is experimental and may change.
Stable
Function is stable (no badge/warning needed).
Superseded
Function has a better alternative but will be maintained.
SoftDeprecated
Function should no longer be used (soft warning first).
Deprecated
Function should no longer be used (warning).
Defunct
Function no longer works (error).
Implementations§
Source§impl LifecycleStage
impl LifecycleStage
Sourcepub fn from_str(s: &str) -> Option<Self>
pub fn from_str(s: &str) -> Option<Self>
Parse a lifecycle stage from a string.
Accepts lowercase stage names. Both "soft-deprecated" and "soft_deprecated"
are recognized. Returns None for unrecognized strings.
Sourcepub fn badge(&self) -> Option<&'static str>
pub fn badge(&self) -> Option<&'static str>
Get the inline R roxygen expression for the lifecycle badge.
Returns an R inline code expression like `r lifecycle::badge("experimental")`
that roxygen2 evaluates to render a colored badge. Returns None for Stable
(no badge needed).
Sourcepub fn signal_fn(&self) -> Option<&'static str>
pub fn signal_fn(&self) -> Option<&'static str>
Get the fully-qualified lifecycle signal function name.
Returns the R function to call at the start of the wrapper body to emit
the lifecycle signal (e.g., "lifecycle::deprecate_warn"). Returns None
for Stable (no signal needed).
Sourcepub fn import_from_fn(&self) -> Option<&'static str>
pub fn import_from_fn(&self) -> Option<&'static str>
Get the bare R function name for @importFrom lifecycle roxygen tag.
Returns the function name without the lifecycle:: prefix.
Trait Implementations§
Source§impl Clone for LifecycleStage
impl Clone for LifecycleStage
Source§fn clone(&self) -> LifecycleStage
fn clone(&self) -> LifecycleStage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LifecycleStage
impl Debug for LifecycleStage
Source§impl Default for LifecycleStage
impl Default for LifecycleStage
Source§fn default() -> LifecycleStage
fn default() -> LifecycleStage
Source§impl Display for LifecycleStage
impl Display for LifecycleStage
Source§impl Eq for LifecycleStage
impl Eq for LifecycleStage
Source§#[doc(hidden)]fn assert_fields_are_eq(&self)
#[doc(hidden)]fn assert_fields_are_eq(&self)
derive_eq_internals)1.0.0 (const: unstable) · Source§#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
#[doc(hidden)]fn assert_receiver_is_total_eq(&self)
implementation detail of #[derive(Eq)]
Source§impl PartialEq for LifecycleStage
impl PartialEq for LifecycleStage
Source§fn eq(&self, other: &LifecycleStage) -> bool
fn eq(&self, other: &LifecycleStage) -> bool
self and other values to be equal, and is used by ==.impl Copy for LifecycleStage
impl StructuralPartialEq for LifecycleStage
impl TrivialClone for LifecycleStage
Auto Trait Implementations§
impl Freeze for LifecycleStage
impl RefUnwindSafe for LifecycleStage
impl Send for LifecycleStage
impl Sync for LifecycleStage
impl Unpin for LifecycleStage
impl UnsafeUnpin for LifecycleStage
impl UnwindSafe for LifecycleStage
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreimpl<T> Printable for T
Layout§
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: 1 byte
Size for each variant:
Experimental: 0 bytesStable: 0 bytesSuperseded: 0 bytesSoftDeprecated: 0 bytesDeprecated: 0 bytesDefunct: 0 bytes