Poppable

Trait Poppable 

Source
pub trait Poppable {
    // Required method
    fn pop(&mut self) -> bool;
}
Expand description

Something poppable Path-like

This trait provides the pop method, which does the same as PathBuf::pop. However, the trait is implemented for a number of different types that implement AsRef<Path>.

Required Methods§

Source

fn pop(&mut self) -> bool

Remove the last component from this path

Returns true if a component was removed. Returns false and does not mutate the path if self.as_ref().parent() would return None.

This fn is equivalent to what PathBuf::pop does.

Implementations on Foreign Types§

Source§

impl Poppable for &Path

Source§

fn pop(&mut self) -> bool

Source§

impl Poppable for Cow<'_, Path>

Source§

fn pop(&mut self) -> bool

Source§

impl Poppable for PathBuf

Source§

fn pop(&mut self) -> bool

Implementors§