OxL Справочник OxL
РусскийEnglish

method Rc.clone

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

Example:

oxl✓ проверяется в CI
fn main() io {
  let a: Rc<i32> = Rc.new(1)
  let b = a.clone()
  print("cloned")
}
Вывод
cloned
pub(api) fn clone() -> Rc<T>

С версии. 1.0.0-beta

Возвращает

Rc<T>

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/core/task.oxl:181

См. также