# Enum bitflags::__core::path::Component [−] [src]

    pub enum Component<'a> {
        Prefix(PrefixComponent<'a>),
        RootDir,
        CurDir,
        ParentDir,
        Normal(&'a OsStr),
    }

1.0.0

A single component of a path.

See the module documentation for an in-depth explanation of components and their role in the API.

## Variants

`Prefix` | A Windows path prefix, e.g. `C:` or `\\server\share`. Does not occur on Unix. |
`RootDir` | The root directory component, appears after any prefix and before anything else |
`CurDir` | A reference to the current directory, i.e. `.` |
`ParentDir` | A reference to the parent directory, i.e. `..` |
`Normal` | A normal component, i.e. `a` and `b` in `a/b` |

## Methods

### `impl<'a> Component<'a>`

#### `fn as_os_str(self) -> &'a OsStr`

Extracts the underlying `OsStr` slice

## Trait Implementations

### `impl<'a> AsRef<OsStr> for Component<'a>`

#### `fn as_ref(&self) -> &OsStr`

### Derived Implementations

### `impl<'a> Debug for Component<'a>`

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>`

### `impl<'a> Hash for Component<'a>`

#### `fn hash<__H>(&self, __arg_0: &mut __H) where __H: Hasher`

#### `fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher` 1.3.0

### `impl<'a> Ord for Component<'a>`

#### `fn cmp(&self, __arg_0: &Component<'a>) -> Ordering`

### `impl<'a> PartialOrd<Component<'a>> for Component<'a>`

#### `fn partial_cmp(&self, __arg_0: &Component<'a>) -> Option<Ordering>`

#### `fn lt(&self, __arg_0: &Component<'a>) -> bool`

#### `fn le(&self, __arg_0: &Component<'a>) -> bool`

#### `fn gt(&self, __arg_0: &Component<'a>) -> bool`

#### `fn ge(&self, __arg_0: &Component<'a>) -> bool`

### `impl<'a> Eq for Component<'a>`

### `impl<'a> PartialEq<Component<'a>> for Component<'a>`

#### `fn eq(&self, __arg_0: &Component<'a>) -> bool`

#### `fn ne(&self, __arg_0: &Component<'a>) -> bool`

### `impl<'a> Clone for Component<'a>`

#### `fn clone(&self) -> Component<'a>`

#### `fn clone_from(&mut self, source: &Self)`

### `impl<'a> Copy for Component<'a>`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)