pub enum SeekFrom {
Start(u64),
End(i64),
Current(i64),
}🔬This is a nightly-only experimental API. (
core_io #154046)Expand description
Enumeration of possible methods to seek within an I/O object.
It is used by the Seek trait.
Variants§
Start(u64)
🔬This is a nightly-only experimental API. (
core_io #154046)Sets the offset to the provided number of bytes.
End(i64)
🔬This is a nightly-only experimental API. (
core_io #154046)Sets 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)
🔬This is a nightly-only experimental API. (
core_io #154046)Sets 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§
1.0.0 · Source§impl Clone for SeekFrom
impl Clone for SeekFrom
Source§fn clone(&self) -> SeekFrom
fn clone(&self) -> SeekFrom
This item is validated for IEC 61508 (SIL 2) and ISO 26262 (ASIL B).
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)where
Self:,
fn clone_from(&mut self, source: &Self)where
Self:,
This item is validated for IEC 61508 (SIL 2) and ISO 26262 (ASIL B).
Performs copy-assignment from
source. Read moreimpl Copy for SeekFrom
impl Eq for SeekFrom
1.0.0 · Source§impl PartialEq for SeekFrom
impl PartialEq for SeekFrom
impl StructuralPartialEq for SeekFrom
Auto Trait Implementations§
impl Freeze for SeekFrom
impl RefUnwindSafe for SeekFrom
impl Send for SeekFrom
impl Sync for SeekFrom
impl Unpin for SeekFrom
impl UnsafeUnpin 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
This item is validated for IEC 61508 (SIL 2) and ISO 26262 (ASIL B).
Mutably borrows from an owned value. Read more