Skip to content

Tracking Issue for OnceCell/Lock::get_mut_or_init #121641

Open
@tisonkun

Description

@tisonkun

Feature gate: #![feature(once_cell_get_mut)]

This is a tracking issue for

  • OnceCell::get_mut_or_init()
  • OnceCell::get_mut_or_try_init()
  • OnceLock::get_mut_or_init()
  • OnceLock::get_mut_or_try_init()

Public API

    pub fn get_mut_or_try_init<F, E>(&mut self, f: F) -> Result<&mut T, E>
    where
        F: FnOnce() -> Result<T, E> { ... }

    pub fn get_mut_or_init<F>(&mut self, f: F) -> &mut T
    where
        F: FnOnce() -> T { ... }

Steps / History

Unresolved Questions

None yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions