pub enum SeekFrom {
Start(usize),
End(isize),
}
Expand description
Specifies the cursor position for File::seek
Variants§
Start(usize)
Sets the cursor to the specified number of bytes, starting from the beginning of the file
The provided number must be ranging from 0 to the length of the file
End(isize)
Sets the cursor to the length of the file, plus the specified amount.
Note that the cursor cannot be set to a absolute position greater than the length of the file, so the relative position provided must be number ranging from the negative length of the file to 0.
Auto Trait Implementations§
impl Freeze for SeekFrom
impl RefUnwindSafe for SeekFrom
impl Send for SeekFrom
impl Sync for SeekFrom
impl Unpin for SeekFrom
impl UnwindSafe for SeekFrom
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more