Struct relative_path::RelativePathBuf [] [src]

pub struct RelativePathBuf { /* fields omitted */ }

An owned, mutable relative path.

This type provides methods to manipulate relative path objects.

Methods

impl RelativePathBuf
[src]

[src]

Create a new relative path buffer, guaranteeing that it is relative.

A relative path is one that does not start with a path separator (/).

[src]

Join this relative path with another relative path.

[src]

Push another relative path to this path.

  • Ignore sequences of separators (/).

[src]

Convert to an owned RelativePathBuf.

[src]

Iterate over all components in this relative path.

Skips over the separator.

[src]

Create a new path buffer relative to the given path.

The created path will be relative to the provided relative_to argument.

Examples

use relative_path::RelativePath;
use std::path::Path;

let path_buf = RelativePath::new("foo/bar").to_relative_of(Path::new("."));

[src]

Check if path starts with a path separator.

Methods from Deref<Target = RelativePath>

[src]

Join this relative path with another relative path.

[src]

Iterate over all components in this relative path.

[src]

Convert to an owned RelativePathBuf.

[src]

Create a new path buffer relative to the given path.

[src]

Check if path starts with a path separator.

Trait Implementations

impl Clone for RelativePathBuf
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for RelativePathBuf
[src]

[src]

Formats the value using the given formatter.

impl AsRef<RelativePath> for RelativePathBuf
[src]

[src]

Performs the conversion.

impl Borrow<RelativePath> for RelativePathBuf
[src]

[src]

Immutably borrows from an owned value. Read more

impl From<String> for RelativePathBuf
[src]

[src]

Performs the conversion.

impl Deref for RelativePathBuf
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl PartialEq for RelativePathBuf
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for RelativePathBuf
[src]

impl PartialOrd for RelativePathBuf
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for RelativePathBuf
[src]

[src]

This method returns an Ordering between self and other. Read more

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl<'a, 'b> PartialEq<RelativePath> for RelativePathBuf
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a, 'b> PartialOrd<RelativePath> for RelativePathBuf
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialEq<&'a RelativePath> for RelativePathBuf
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a, 'b> PartialOrd<&'a RelativePath> for RelativePathBuf
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialEq<Cow<'a, RelativePath>> for RelativePathBuf
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a, 'b> PartialOrd<Cow<'a, RelativePath>> for RelativePathBuf
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialEq<str> for RelativePathBuf
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a, 'b> PartialOrd<str> for RelativePathBuf
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialEq<&'a str> for RelativePathBuf
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a, 'b> PartialOrd<&'a str> for RelativePathBuf
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, 'b> PartialEq<String> for RelativePathBuf
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<'a, 'b> PartialOrd<String> for RelativePathBuf
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more