[][src]Struct onnxruntime::environment::EnvBuilder

pub struct EnvBuilder { /* fields omitted */ }

Struct used to build an environment Environment

This is the crate's main entry point. An environment must be created as the first step. An Environment can only be built using EnvBuilder to configure it.

NOTE: If the same configuration method (for example with_name()) is called multiple times, the last value will have precedence.

Implementations

impl EnvBuilder[src]

pub fn with_name<S>(self, name: S) -> EnvBuilder where
    S: Into<String>, 
[src]

Configure the environment with a given name

NOTE: Since ONNX can only define one environment per process, creating multiple environments using multiple EnvBuilder will end up re-using the same environment internally; a new one will not be created. New parameters will be ignored.

pub fn with_log_level(self, log_level: LoggingLevel) -> EnvBuilder[src]

Configure the environment with a given log level

NOTE: Since ONNX can only define one environment per process, creating multiple environments using multiple EnvBuilder will end up re-using the same environment internally; a new one will not be created. New parameters will be ignored.

pub fn build(self) -> Result<Environment>[src]

Commit the configuration to a new Environment

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.