pub struct RawBufferSource { /* private fields */ }Expand description
A buffer variant of RawSource.
use rustbolt_sources::{MapOptions, RawBufferSource, Source};
let code = "some source code".as_bytes();
let s = RawBufferSource::from(code);
assert_eq!(s.buffer(), code);
assert_eq!(s.map(&MapOptions::default()), None);
assert_eq!(s.size(), 16);Trait Implementations§
Source§impl Clone for RawBufferSource
impl Clone for RawBufferSource
Source§fn clone(&self) -> RawBufferSource
fn clone(&self) -> RawBufferSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RawBufferSource
impl Debug for RawBufferSource
Source§impl From<&[u8]> for RawBufferSource
impl From<&[u8]> for RawBufferSource
Source§impl Hash for RawBufferSource
impl Hash for RawBufferSource
Source§impl PartialEq for RawBufferSource
impl PartialEq for RawBufferSource
Source§impl Source for RawBufferSource
impl Source for RawBufferSource
Source§impl StreamChunks for RawBufferSource
impl StreamChunks for RawBufferSource
Source§fn stream_chunks<'a>(
&'a self,
options: &MapOptions,
on_chunk: OnChunk<'_, 'a>,
on_source: OnSource<'_, 'a>,
on_name: OnName<'_, 'a>,
) -> GeneratedInfo
fn stream_chunks<'a>( &'a self, options: &MapOptions, on_chunk: OnChunk<'_, 'a>, on_source: OnSource<'_, 'a>, on_name: OnName<'_, 'a>, ) -> GeneratedInfo
StreamChunks abstraction
impl Eq for RawBufferSource
impl StructuralPartialEq for RawBufferSource
Auto Trait Implementations§
impl !Freeze for RawBufferSource
impl RefUnwindSafe for RawBufferSource
impl Send for RawBufferSource
impl Sync for RawBufferSource
impl Unpin for RawBufferSource
impl UnwindSafe for RawBufferSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more