OxL Reference

method Rc.clone

Another pointer to the same value (the count grows by one).

Example:

oxl✓ checked in CI
fn main() io {
  let a: Rc<i32> = Rc.new(1)
  let b = a.clone()
  print("cloned")
}
Output
cloned
pub(api) fn clone() -> Rc<T>

Since. 1.0.0-beta

Returns

Rc<T>

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/task.oxl:181

See also