rs::receiver::c

Type Alias State

Source
pub type State = Wrapped<Threaded<Application>>;

Aliased Type§

struct State(*const RefCell<Threaded<Application>>);

Fields§

§0: *const RefCell<Threaded<Application>>

Implementations

Source§

impl<T> Wrapped<T>

Source

pub fn new(value: T) -> Wrapped<T>

Source

pub fn wrap(state: Rc<RefCell<T>>) -> Wrapped<T>

Source

pub unsafe fn unwrap(self) -> Rc<RefCell<T>>

Extracts the reference to the data. It may cause problems if attempted in more than one place

Source

pub fn clone_ref(&self) -> Rc<RefCell<T>>

Creates a new Rc reference to the same data. Use for accessing the underlying data as a reference.

Trait Implementations

Source§

impl<T> Clone for Wrapped<T>

Source§

fn clone(&self) -> Wrapped<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Clone> CloneOwned for Wrapped<T>

ToOwned won’t work here because it’s really difficult to implement Borrow on Wrapped with the Rc<RefCell<>> chain on the way to the data

Source§

type Owned = T

Source§

fn clone_owned(&self) -> T

Source§

impl<T> COpaquePtr for Wrapped<T>