pub struct ContextFile {
pub name: String,
pub bytes: Vec<u8>,
}Expand description
The contents of one file a plugin asked to see.
Owned rather than borrowed, because a plugin can hold onto it: asking for a file twice asks the host twice, which is cheap for the host (it caches) and means no lifetime has to be threaded through a plugin’s own code.
Fields§
§name: StringThe path as the plugin’s manifest declared it.
bytes: Vec<u8>The bytes, which need not be UTF-8: how to read them is the plugin’s business.
Implementations§
Trait Implementations§
Source§impl Clone for ContextFile
impl Clone for ContextFile
Source§impl Debug for ContextFile
impl Debug for ContextFile
impl Eq for ContextFile
Source§impl PartialEq for ContextFile
impl PartialEq for ContextFile
impl StructuralPartialEq for ContextFile
Auto Trait Implementations§
impl Freeze for ContextFile
impl RefUnwindSafe for ContextFile
impl Send for ContextFile
impl Sync for ContextFile
impl Unpin for ContextFile
impl UnsafeUnpin for ContextFile
impl UnwindSafe for ContextFile
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