OxL Reference

method Rc.new

A new reference-counted pointer to value.

Example:

oxl✓ checked in CI
fn main() io {
  let a: Rc<str> = Rc.new("shared")
  print("ok")
}
Output
ok
pub(api) static fn new(value: T) -> Rc<T>

Since. 1.0.0-beta

Parameters

NameType
valueT

Returns

Rc<T>

Effects

none declared (pure unless the body says otherwise)

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

See also