Struct csharp_binder::CSharpBuilder [−][src]
The CSharpBuilder is used to load a Rust script string, and convert it into the appropriate C# script as a string.
Implementations
impl<'a> CSharpBuilder<'a>
[src]
pub fn new(
script: &str,
dll_name: &str,
configuration: &'a mut CSharpConfiguration
) -> Result<CSharpBuilder<'a>, Error>
[src]
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.
pub fn build(&mut self) -> Result<String, Error>
[src]
This function will return the C# script. Should be called after the C# Builder is setup.
pub fn set_namespace(&mut self, namespace: &str)
[src]
Sets the namespace the C# script should use to generate its functions in. If not set, no namespace will be used.
pub fn set_type(&mut self, type_name: &str)
[src]
Sets the type that will be wrapped around the generated C# script. If not set, no type will be used.
pub fn add_using(&mut self, using: &str)
[src]
Adds a using to the top of the C# script.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for CSharpBuilder<'a>
[src]
impl<'a> !Send for CSharpBuilder<'a>
[src]
impl<'a> !Sync for CSharpBuilder<'a>
[src]
impl<'a> Unpin for CSharpBuilder<'a>
[src]
impl<'a> !UnwindSafe for CSharpBuilder<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,