doc.rust-lang.org
pub fn new(value: T) -> Rc<T>
Constructs a new Rc<T>.
associated_function
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn make_mut(this: &mut Self) -> &mut T
Makes a mutable reference into the given Rc.
associated_function
alloc
Stable since 1.4.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_raw(this: Self) -> *const T
Consumes the Rc, returning the wrapped pointer.
associated_function
alloc
Stable since 1.17.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn into_inner(this: Self) -> Option<T>
Returns the inner value, if the Rc has exactly one strong reference.
associated_function
alloc
Stable since 1.70.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn increment_strong_count(ptr: *const T)
Increments the strong reference count on the Rc<T> associated with the provided pointer by one.
associated_function
alloc
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn get_mut(this: &mut Self) -> Option<&mut T>
Returns a mutable reference into the given Rc, if there are no other Rc or Weak pointers to the same allocation.
associated_function
alloc
Stable since 1.4.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn from_raw(ptr: *const T) -> Self
Constructs an Rc<T> from a raw pointer.
associated_function
alloc
Stable since 1.17.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn downgrade(this: &Self) -> Weak<T, A>
Creates a new Weak pointer to this allocation.
associated_function
alloc
Stable since 1.4.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn downcast<T>(self) -> Result<Rc<T, A>, Self>
Attempts to downcast the Rc<dyn Any> to a concrete type.
method
alloc
Stable since 1.29.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn decrement_strong_count(ptr: *const T)
Decrements the strong reference count on the Rc<T> associated with the provided pointer by one.
associated_function
alloc
Stable since 1.53.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn assume_init(self) -> Rc<T, A>
Converts to Rc<T>.
method
alloc
Stable since 1.82.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn as_ptr(this: &Self) -> *const T
Provides a raw pointer to the data.
associated_function
alloc
Stable since 1.45.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Rc<T, A>
A single-threaded reference-counting pointer. 'Rc' stands for 'Reference Counted'.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub mod rc
Single-threaded reference-counting pointers. 'Rc' stands for 'Reference Counted'.
module
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Split<B>
An iterator over the contents of an instance of BufRead split on a particular byte.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Lines<B>
An iterator over the lines of an instance of BufRead.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct Bytes<R>
An iterator over u8 values of a reader.
struct
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn read_to_string<R>(reader: R) -> crate::io::Result<crate::string::String>
Reads all bytes from a reader into a new String.
function
alloc
Stable since 1.65.0
Version 1.100.0-nightly
doc.rust-lang.org
fn take(self, limit: u64) -> Take<Self>
Creates an adapter which will read at most limit bytes from it.
method
alloc
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
Like read, except that it reads into a slice of buffers.
method
alloc
Stable since 1.36.0
Version 1.100.0-nightly