Struct quartz_cli::endpoint::EndpointHandle
source · pub struct EndpointHandle {
pub path: Vec<String>,
}Fields§
§path: Vec<String>List of ordered parent names
Implementations§
source§impl EndpointHandle
impl EndpointHandle
sourcepub const QUARTZ: Self = _
pub const QUARTZ: Self = _
Points to top-level quartz folder.
This constant can be used to traverse through all handles starting from the top one.
pub fn new(path: Vec<String>) -> Self
pub fn from_state(ctx: &Ctx) -> Option<Self>
pub fn head(&self) -> String
pub fn dir(&self, ctx: &Ctx) -> PathBuf
pub fn handle(&self) -> String
pub fn exists(&self, ctx: &Ctx) -> bool
sourcepub fn make_empty(&self, ctx: &Ctx)
pub fn make_empty(&self, ctx: &Ctx)
Removes endpoint to make it an empty handle
pub fn depth(&self) -> usize
pub fn children(&self, ctx: &Ctx) -> Vec<EndpointHandle>
pub fn endpoint(&self, ctx: &Ctx) -> Option<Endpoint>
pub fn replace(&mut self, from: &str, to: &str)
pub fn tree(self, ctx: &Ctx) -> Tree<Self>
Trait Implementations§
source§impl Clone for EndpointHandle
impl Clone for EndpointHandle
source§fn clone(&self) -> EndpointHandle
fn clone(&self) -> EndpointHandle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for EndpointHandle
impl Debug for EndpointHandle
Auto Trait Implementations§
impl Freeze for EndpointHandle
impl RefUnwindSafe for EndpointHandle
impl Send for EndpointHandle
impl Sync for EndpointHandle
impl Unpin for EndpointHandle
impl UnwindSafe for EndpointHandle
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