pub struct WritableKeyPath<Root, Value> {
pub get: for<'a> fn(&'a Root) -> &'a Value,
pub get_mut: for<'a> fn(&'a mut Root) -> &'a mut Value,
}
Expand description
Read/write keypath
Fields§
§get: for<'a> fn(&'a Root) -> &'a Value
§get_mut: for<'a> fn(&'a mut Root) -> &'a mut Value
Implementations§
Source§impl<Root, Value> WritableKeyPath<Root, Value>
impl<Root, Value> WritableKeyPath<Root, Value>
pub fn new( get: for<'a> fn(&'a Root) -> &'a Value, get_mut: for<'a> fn(&'a mut Root) -> &'a mut Value, ) -> WritableKeyPath<Root, Value>
Trait Implementations§
Source§impl<Root, Value> Readable<Root, Value> for WritableKeyPath<Root, Value>
impl<Root, Value> Readable<Root, Value> for WritableKeyPath<Root, Value>
Source§impl<Root, Value> Writable<Root, Value> for WritableKeyPath<Root, Value>
impl<Root, Value> Writable<Root, Value> for WritableKeyPath<Root, Value>
fn get_mut<'a>(&self, root: &'a mut Root) -> &'a mut Value
fn get_mut_fn(&self) -> for<'a> fn(&'a mut Root) -> &'a mut Value
fn iter_mut<'a>(
&self,
slice: &'a mut [Root],
) -> Box<dyn Iterator<Item = &'a mut Value> + 'a>where
Self: Sized,
Auto Trait Implementations§
impl<Root, Value> Freeze for WritableKeyPath<Root, Value>
impl<Root, Value> RefUnwindSafe for WritableKeyPath<Root, Value>
impl<Root, Value> Send for WritableKeyPath<Root, Value>
impl<Root, Value> Sync for WritableKeyPath<Root, Value>
impl<Root, Value> Unpin for WritableKeyPath<Root, Value>
impl<Root, Value> UnwindSafe for WritableKeyPath<Root, Value>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more