pub struct IncludeSource { /* private fields */ }Expand description
An opened include source.
Providers can return an in-memory buffer or an owned byte reader.
Implementations§
Source§impl IncludeSource
impl IncludeSource
Sourcepub fn from_reader(reader: impl Read + 'static) -> Self
pub fn from_reader(reader: impl Read + 'static) -> Self
Create an include source from an owned reader.
Sourcepub fn from_bytes(bytes: impl Into<Vec<u8>>) -> Self
pub fn from_bytes(bytes: impl Into<Vec<u8>>) -> Self
Create an include source from owned bytes.
Sourcepub fn from_string(source: impl Into<String>) -> Self
pub fn from_string(source: impl Into<String>) -> Self
Create an include source from an owned UTF-8 string.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for IncludeSource
impl !Send for IncludeSource
impl !Sync for IncludeSource
impl !UnwindSafe for IncludeSource
impl Freeze for IncludeSource
impl Unpin for IncludeSource
impl UnsafeUnpin for IncludeSource
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