pub fn build(self) -> Result<Options> {
        let filters: LogFilters = match self.filters {
            None => match get_env_var(RUST_LOG_ENV_VAR)? {
                None => LogFilters(vec![]),
                Some(filters_str) => filters_str.parse()?,
            },
            Some(filters) => filters,
        };
        let max_level: LevelFilter = filters
            .0
            .iter()
            .map(|f| f.level)
            .max()
            .unwrap_or(LevelFilter::Trace);

        Ok(Options {
            filters: filters,
            max_level: max_level,
            output_factory: self
                .output_factory
                .unwrap_or_else(|| Box::new(|| Box::new(::std::io::stderr()))),
            panic_on_output_failure: self.panic_on_output_failure.unwrap_or(false),
            always_flush: self.always_flush.unwrap_or(false),
        })
    }
/// Build an Options structure from this builder's current state. This might
/// return an error if no custom filters were specified, and attempting to
/// retrieve filters from an environment variable fails.
Build an Options structure from this builder's current state. This might
return an error if no custom filters were specified, and attempting to
retrieve filters from an environment variable fails.
Build an Options structure from this builder ' s current state . This might return an error if no custom filters were specified and attempting to retrieve filters from an environment variable fails .
pub fn build(self) -> Result<Options> {
        let filters: LogFilters = match self.filters {
            None => match get_env_var(RUST_LOG_ENV_VAR)? {
                None => LogFilters(vec![]),
                Some(filters_str) => filters_str.parse()?,
            },
            Some(filters) => filters,
        };
        let max_level: LevelFilter = filters
            .0
            .iter()
            .map(|f| f.level)
            .max()
            .unwrap_or(LevelFilter::Trace);
        Ok(Options {
            filters: filters,
            max_level: max_level,
            output_factory: self
                .output_factory
                .unwrap_or_else(|| Box::new(|| Box::new(::std::io::stderr()))),
            panic_on_output_failure: self.panic_on_output_failure.unwrap_or(false),
            always_flush: self.always_flush.unwrap_or(false),
        })
    }
pub fn build ( self ) -> Result < Options > { let filters : LogFilters = match self . filters { None => match get_env_var ( RUST_LOG_ENV_VAR ) ? { None => LogFilters ( vec ! [ ] ) , Some ( filters_str ) => filters_str . parse ( ) ? , } , Some ( filters ) => filters , } ; let max_level : LevelFilter = filters . 0 . iter ( ) . map ( | f | f . level ) . max ( ) . unwrap_or ( LevelFilter :: Trace ) ; Ok ( Options { filters : filters , max_level : max_level , output_factory : self . output_factory . unwrap_or_else ( | | Box :: new ( | | Box :: new ( :: std :: io :: stderr ( ) ) ) ) , panic_on_output_failure : self . panic_on_output_failure . unwrap_or ( false ) , always_flush : self . always_flush . unwrap_or ( false ) , } ) }
Build an Options structure from this builder's current state.
Build an Options structure from this builder ' s current state .
self
self