pub struct Script { /* private fields */ }
Implementations§
Source§impl Script
impl Script
pub fn get_api(&self) -> Api
Sourcepub fn core(&self) -> Result<CoreRef<'_>, ScriptError>
pub fn core(&self) -> Result<CoreRef<'_>, ScriptError>
Returns a reference to the core associated with this script.
§Errors
Returns an error message if the core could not be retrieved.
Sourcepub fn evaluate(
&self,
buffer: &CStr,
filename: &CStr,
) -> Result<(), ScriptError>
pub fn evaluate( &self, buffer: &CStr, filename: &CStr, ) -> Result<(), ScriptError>
Evaluates a script buffer with the given filename.
§Errors
Returns an error message if the script evaluation fails.
Sourcepub fn evaluate_file(&self, filename: &CStr) -> Result<(), ScriptError>
pub fn evaluate_file(&self, filename: &CStr) -> Result<(), ScriptError>
Sourcepub fn get_output(&self, index: c_int) -> Result<OutputNode, ScriptError>
pub fn get_output(&self, index: c_int) -> Result<OutputNode, ScriptError>
Gets the output node at the specified index.
§Errors
Returns a ScriptError
if the output node could not be retrieved.
Trait Implementations§
impl Eq for Script
impl StructuralPartialEq for Script
Auto Trait Implementations§
impl Freeze for Script
impl RefUnwindSafe for Script
impl !Send for Script
impl !Sync for Script
impl Unpin for Script
impl UnwindSafe for Script
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