pub struct SandboxInstance {
pub sid: Option<String>,
pub classes: HashMap<String, Class>,
pub repo: Repository,
pub globals: HashMap<String, Value>,
}Expand description
SandboxInstance holds all the data needed to read and render generated content as well as the model for generating content.
Fields§
§sid: Option<String>§classes: HashMap<String, Class>§repo: Repository§globals: HashMap<String, Value>Implementations§
Source§impl SandboxInstance
impl SandboxInstance
pub fn new() -> Self
pub fn with_scroll(&mut self, scroll_filepath: PathBuf) -> Result<&mut Self>
pub fn open(&mut self, filepath: &str) -> Result<&mut Self>
pub fn create(&mut self, filepath: &str) -> Result<&mut Self>
pub fn sid(&self) -> Option<String>
pub fn parse_buffer(&mut self, buffer: &str) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SandboxInstance
impl !RefUnwindSafe for SandboxInstance
impl Send for SandboxInstance
impl Sync for SandboxInstance
impl Unpin for SandboxInstance
impl !UnwindSafe for SandboxInstance
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