Struct rcref::RcRef
[−]
[src]
pub struct RcRef<T, U> { /* fields omitted */ }
Something that holds a std::rc::Rc
strong reference,
but derefs to some component inside of it.
Methods
impl<T, U> RcRef<T, U>
[src]
fn new<F>(rc: Rc<T>, f: F) -> RcRef<T, U> where
F: FnOnce(&T) -> &U,
F: FnOnce(&T) -> &U,
Create a RcRef
for a component in a given Rc
.
fn new_opt<F>(rc: Rc<T>, f: F) -> Option<RcRef<T, U>> where
F: FnOnce(&T) -> Option<&U>,
F: FnOnce(&T) -> Option<&U>,
Create a RcRef
for and a component that may or may not be in a given Rc
.