[−][src]Struct mini_haskell::rc_view::RcView
A view into an Rc.
Implementations
impl<T: ?Sized, U: ?Sized> RcView<T, U>[src]
pub fn new(whole: Rc<T>, to_focus: impl FnOnce(&T) -> &U) -> Self[src]
Create a view into an Rc.
pub unsafe fn wrap(whole: Rc<T>, focus: &U) -> Self[src]
Create a view into an Rc.
Safety
Call on this unsafe functions should take special care so that the provided
reference focus is indeed a view into the related Rc.
pub fn map<V: ?Sized>(self, f: impl FnOnce(&U) -> &V) -> RcView<T, V>[src]
Refocus the view.
pub unsafe fn derive<V: ?Sized>(&self, focus: &V) -> RcView<T, V>[src]
Derive an RcView to a new focus from this view.
Safety
Call on this unsafe functions should take special care so that the provided
reference focus is indeed a view into the related Rc.
pub unsafe fn derive_take<V: ?Sized>(self, focus: &V) -> RcView<T, V>[src]
Trait Implementations
impl<T: ?Sized, U: Debug + ?Sized> Debug for RcView<T, U>[src]
impl<T: ?Sized, U: ?Sized> Deref for RcView<T, U>[src]
impl<T: ?Sized, U: Display + ?Sized> Display for RcView<T, U>[src]
impl<T: ?Sized> From<Rc<T>> for RcView<T, T>[src]
impl<T: ?Sized, U> From<RcView<UnsafeCell<T>, Option<U>>> for Option<U>[src]
fn from(this: RcView<UnsafeCell<T>, Option<U>>) -> Self[src]
Auto Trait Implementations
impl<T, U> !RefUnwindSafe for RcView<T, U>
impl<T, U> !Send for RcView<T, U>
impl<T, U> !Sync for RcView<T, U>
impl<T: ?Sized, U: ?Sized> Unpin for RcView<T, U>
impl<T: ?Sized, U: ?Sized> UnwindSafe for RcView<T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
T: RefUnwindSafe,
U: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,