pub struct Path<'a> { /* private fields */ }
Expand description
Path used to get the id of a specific pane in the mux.
self can be directed by calling .up()
, .down()
, .left()
and .right()
on the instance.
To get the final id of a pane .build()
.
Implementations§
Source§impl<'a> Path<'a>
impl<'a> Path<'a>
Sourcepub fn build(self) -> Option<Id>
pub fn build(self) -> Option<Id>
Finsihing of the path, Option contains the target Id If Option None no Id could be found fitting to the path Consumes the path
§Example
let mut mux = Mux::new();
let node1 = mux.add_right_of(DummyView, mux.root().build().unwrap()).unwrap();
mux.add_below(DummyView, node1);
let path = mux.root().up().build();
assert_eq!(node1, path.unwrap());
Sourcepub fn up(self) -> Self
pub fn up(self) -> Self
Going up from the current position in the mux
Target can be get by calling .build()
Sourcepub fn down(self) -> Self
pub fn down(self) -> Self
Going down from the current position in the mux
Target can be get by calling .build()
Auto Trait Implementations§
impl<'a> Freeze for Path<'a>
impl<'a> !RefUnwindSafe for Path<'a>
impl<'a> Send for Path<'a>
impl<'a> Sync for Path<'a>
impl<'a> Unpin for Path<'a>
impl<'a> !UnwindSafe for Path<'a>
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