std::io::SeekFrom - Rust
Description: API documentation for the Rust `SeekFrom` enum in crate `std`.
Keywords: rust, rustlang, rust-lang, SeekFrom

# Enum std::io::SeekFrom 1.0.0 [−] [src]

    pub enum SeekFrom {
        Start(u64),
        End(i64),
        Current(i64),
    }

Enumeration of possible methods to seek within an I/O object.

It is used by the `Seek` trait.

## Variants

`Start(u64)`

Set the offset to the provided number of bytes.

`End(i64)`

Set the offset to the size of this object plus the specified number of bytes.

It is possible to seek beyond the end of an object, but it's an error to seek before byte 0.

`Current(i64)`

Set the offset to the current position plus the specified number of bytes.

It is possible to seek beyond the end of an object, but it's an error to seek before byte 0.

## Trait Implementations

### `impl Copy for SeekFrom`
[src]

### `impl PartialEq for SeekFrom`
[src]

#### `fn eq(&self, __arg_0: &SeekFrom) -> bool`
[src]

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

#### `fn ne(&self, __arg_0: &SeekFrom) -> bool`
[src]

This method tests for `!=`.

### `impl Eq for SeekFrom`
[src]

### `impl Clone for SeekFrom`
[src]

#### `fn clone(&self) -> SeekFrom`
[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from `source`. Read more

### `impl Debug for SeekFrom`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`
[src]

Formats the value using the given formatter. Read more

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
↑
  Move up in search results
↓
  Move down in search results
↹
  Switch tab
⏎
  Go to active search result
+ / -
  Collapse/expand all sections

## 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`)