fn seek(&mut self, pos: usize) -> Result<(), ()> {
        if pos <= self.len() {
            self.truncate(pos);
            Ok(())
        } else {
            Err(())
        }
    }
/// Seeking in a `Vec<Word>` only succeeds if the provided position `pos` is smaller
/// than or equal to the vector's current length. In this case, seeking will truncate
/// the vector to length `pos`. This is because vectors have [`Stack`] semantics, and
/// the current read/write position (i.e., the head of the stack) is always at the end
/// of the vector.
///
/// If you have a `Vec` with name `v` and your intention is to read to or write from it
/// at arbitrary positions rather than just at the end then you probably want to wrap
/// either `v` or the slice `&v[..]` in a [`Cursor`].
Seeking in a `Vec` only succeeds if the provided position `pos` is smaller
than or equal to the vector's current length. In this case, seeking will truncate
the vector to length `pos`. This is because vectors have [`Stack`] semantics, and
the current read/write position  is always at the end
of the vector.


Seeking in a ` Vec ` only succeeds if the provided position ` pos ` is smaller than or equal to the vector ' s current length . In this case seeking will truncate the vector to length ` pos ` . This is because vectors have [ ` Stack ` ] semantics and the current read / write position is always at the end of the vector .
fn seek(&mut self, pos: usize) -> Result<(), ()> {
        if pos <= self.len() {
            self.truncate(pos);
            Ok(())
        } else {
            Err(())
        }
    }
fn seek ( & mut self , pos : usize ) -> Result < ( ) , ( ) > { if pos <= self . len ( ) { self . truncate ( pos ) ; Ok ( ( ) ) } else { Err ( ( ) ) } }
Seeking in a `Vec<Word>` only succeeds if the provided position `pos` is smaller
than or equal to the vector's current length.
Seeking in a ` Vec<Word > ` only succeeds if the provided position ` pos ` is smaller than or equal to the vector ' s current length .
&mut self
pos
usize
&mut self
pos
usize