Struct ReferencePath

Source
pub struct ReferencePath<'r, P: Path + ?Sized>(/* private fields */);
Expand description

A Path that is made from borrowing an owned path.

See as_ref_path.

Trait Implementations§

Source§

impl<'r, P: Path + ?Sized> Clone for ReferencePath<'r, P>

Source§

fn clone(&self) -> Self

Returns a duplicate 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<'r, P: Path + ?Sized> Path for ReferencePath<'r, P>

Source§

type Out = <P as Path>::Out

Source§

impl<'r, P: PathExtGuaranteed + ?Sized> PathExtGuaranteed for ReferencePath<'r, P>

Source§

fn borrow(&self) -> Ref<'_, <Self as Path>::Out>

Borrow the data at this path immutably. Read more
Source§

fn borrow_mut(&self) -> BorrowMutGuard<'_, Self>

Borrow the data at this path mutably, notifying all the relevant change listeners when the returned borrow guard is dropped. Read more
Source§

fn borrow_mut_without_notifying(&self) -> RefMut<'_, <Self as Path>::Out>

Borrow the data at this path mutably without notifying any listener. Read more
Source§

fn get(&self) -> Self::Out
where Self::Out: Clone,

Clone the data identified by this path. Read more
Source§

fn set(&self, data: Self::Out)
where Self::Out: Sized,

Set the data identified by this path, notifying listeners. Read more
Source§

impl<'r, P: Path + ?Sized> Copy for ReferencePath<'r, P>

Auto Trait Implementations§

§

impl<'r, P> Freeze for ReferencePath<'r, P>
where P: ?Sized,

§

impl<'r, P> RefUnwindSafe for ReferencePath<'r, P>
where P: RefUnwindSafe + ?Sized,

§

impl<'r, P> Send for ReferencePath<'r, P>
where P: Sync + ?Sized,

§

impl<'r, P> Sync for ReferencePath<'r, P>
where P: Sync + ?Sized,

§

impl<'r, P> Unpin for ReferencePath<'r, P>
where P: ?Sized,

§

impl<'r, P> UnwindSafe for ReferencePath<'r, P>
where P: RefUnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P> PathExt for P
where P: Path + ?Sized,

Source§

fn borrow_opt(&self) -> Option<Ref<'_, <Self as Path>::Out>>

Borrow the data at this path immutably. Read more
Source§

fn borrow_opt_mut(&self) -> Option<BorrowMutGuard<'_, Self>>

Borrow the data at this path mutably, notifying all the relevant change listeners when the returned borrow guard is dropped. Read more
Source§

fn borrow_opt_mut_without_notifying( &self, ) -> Option<RefMut<'_, <Self as Path>::Out>>

Borrow the data at this path mutably without notifying any listener. Read more
Source§

fn notify_changed(&self)

Notify all listeners that the data at this location has changed. Read more
Source§

fn get_opt(&self) -> Option<Self::Out>
where Self::Out: Clone,

Clone the data identified by this path. Read more
Source§

fn set_opt(&self, data: Self::Out) -> Result<(), Self::Out>
where Self::Out: Sized,

Set the data identified by this path, notifying listeners. Read more
Source§

fn until_change(&self) -> UntilChange<'_>

Get a Stream that fires everytime a mutable borrow is taken of this or any encompassing piece of data. Read more
Source§

fn signal_stream(&self, fire_immediately: bool) -> SignalStream<'_, Self>

Get a Stream that fires once every time the data changes, yielding Refs to the data. Read more
Source§

fn for_each<C: FnMut(&Self::Out)>(&self, closure: C) -> ForEach<'_, Self, C>

Execute the given function with the data as argument. Repeat every time the data changes. Read more
Source§

fn for_each_async<F: Future<Output = ()>, C: FnMut(&Self::Out) -> F>( &self, closure: C, ) -> ForEachAsync<'_, Self, F, C>

Execute the given async function (a function returning Future) with the data as argument. Repeat every time the data changes. Read more
Source§

fn bind_for_each<C: FnMut(&Self::Out), I: Stream<Item = Self::Out>>( &self, on_change: C, incoming_changes: I, ) -> BindForEach<'_, Self, C, I>

For making a two-way binding. Read more
Source§

fn until_bubbling_change(&self) -> UntilChange<'_>

Get a Stream that fires everytime a mutable borrow is taken of this piece of data or anything inside it. Read more
Source§

fn build_path(self) -> <Self::Out as Trackable>::PathBuilder<Self>
where Self: Sized, Self::Out: Trackable,

Gives a PathBuilder for creating a path that continues from this path. Read more
Source§

fn as_ref_path( &self, ) -> <Self::Out as Trackable>::PathBuilder<ReferencePath<'_, Self>>
where Self::Out: Trackable,

Create a new Path from borrowing this path. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.