pub enum ByteSource {
Buf(Vec<u8>),
Map(Mmap),
}Expand description
Bytes of one file, mapped when a plain file is large enough.
Compressed input is decoded into a buffer. A plain file under 64 KiB, or anything that is not a regular file, is read into a buffer. A larger plain file stays mapped for the parse and is not copied. The bytes are not checked as UTF-8; the parser reports a bad byte when it reaches it.
Variants§
Implementations§
Auto Trait Implementations§
impl Forget for ByteSource
impl Freeze for ByteSource
impl Move for ByteSource
impl RefUnwindSafe for ByteSource
impl Send for ByteSource
impl Sync for ByteSource
impl Unpin for ByteSource
impl UnsafeUnpin for ByteSource
impl UnwindSafe for ByteSource
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