pub struct CSharpBuilder<'a> { /* private fields */ }
Expand description
The CSharpBuilder is used to load a Rust script string, and convert it into the appropriate C# script as a string.
Implementations§
Source§impl<'a> CSharpBuilder<'a>
impl<'a> CSharpBuilder<'a>
Sourcepub fn new(
script: &str,
dll_name: &str,
configuration: &'a mut CSharpConfiguration,
) -> Result<CSharpBuilder<'a>, Error>
pub fn new( script: &str, dll_name: &str, configuration: &'a mut CSharpConfiguration, ) -> Result<CSharpBuilder<'a>, Error>
Creates a new C# Builder from a Rust script string, the name of the library C# is going to make calls to (the .so/.dll file), and a configuration.
Note that this will immediately parse the rust script and extract its symbols. As such, this can return a parse error.
Sourcepub fn build(&mut self) -> Result<String, Error>
pub fn build(&mut self) -> Result<String, Error>
This function will return the C# script. Should be called after the C# Builder is setup.
Sourcepub fn set_namespace(&mut self, namespace: &str)
pub fn set_namespace(&mut self, namespace: &str)
Sets the namespace the C# script should use to generate its functions in. If not set, no namespace will be used.
Auto Trait Implementations§
impl<'a> Freeze for CSharpBuilder<'a>
impl<'a> RefUnwindSafe for CSharpBuilder<'a>
impl<'a> !Send for CSharpBuilder<'a>
impl<'a> !Sync for CSharpBuilder<'a>
impl<'a> Unpin for CSharpBuilder<'a>
impl<'a> !UnwindSafe for CSharpBuilder<'a>
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