rs::outputs::c

Type Alias COutputs

Source
type COutputs = Wrapped<Outputs>;
Expand description

Wrapping Outputs is required for calling its methods from C

Aliased Type§

struct COutputs(*const RefCell<Outputs>);

Fields§

§0: *const RefCell<Outputs>

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>