Struct dotnetrawfilereader_sys::DotNetLibraryBundle

source ·
pub struct DotNetLibraryBundle { /* private fields */ }
Expand description

A location on the file system and an associated .NET DLL bundle to host a .NET runtime for.

Uses the DOTNET_RAWFILEREADER_BUNDLE_PATH environment variable when a default is required, otherwise creates a temporary directory whose lifespan is linked to this object.

Implementations§

source§

impl DotNetLibraryBundle

source

pub fn new(dir: Option<&str>) -> Result<Self>

Create a new bundle directory. If a path string is provided, that path will be used. Otherwise a temporary directory will be created.

source

pub fn path(&self) -> &Path

Get a path reference to the directory

source

pub fn runtime(&self) -> Arc<AssemblyDelegateLoader>

Get a reference to the .NET runtime, creating it if one has not yet been created.

See DotNetLibraryBundle::create_runtime for specific runtime creation

source

pub fn write_bundle(&self) -> Result<()>

Write all of the bundled .NET DLLs to the file system at this location

source

pub fn create_runtime(&self) -> Arc<AssemblyDelegateLoader>

Create a new .NET runtime using netcorehost

Trait Implementations§

source§

impl Debug for DotNetLibraryBundle

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for DotNetLibraryBundle

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.