Struct bastion::Config [−][src]
pub struct Config { /* fields omitted */ }
Expand description
The configuration that should be used to initialize the
system using Bastion::init_with
.
The default behaviors are the following:
- All backtraces are shown (see
Config::show_backtraces
).
Example
use bastion::prelude::*;
let config = Config::new().show_backtraces();
Bastion::init_with(config);
// You can now use bastion...
Implementations
Creates a new configuration with the following default behaviors:
- All backtraces are shown (see
Config::show_backtraces
).
Makes Bastion show all backtraces, like an application without it would. This can be useful when trying to debug children panicking.
Note that this is the default behavior.
Example
use bastion::prelude::*;
let config = Config::new().show_backtraces();
Bastion::init_with(config);
// You can now use bastion and it will show you the
// backtraces of panics...
Makes Bastion hide all backtraces.
Note that the default behavior is to show all backtraces
(see Config::show_backtraces
).
Example
use bastion::prelude::*;
let config = Config::new().hide_backtraces();
Bastion::init_with(config);
// You can now use bastion and no panic backtraces
// will be shown...
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Config
impl UnwindSafe for Config
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more