Function r3::bind::bind_default
source · pub const fn bind_default<'pool, T, C>(
cfg: &mut Cfg<'pool, C>
) -> Bind<'pool, C::System, T>where
T: Default + 'static,
C: CfgStatic,
Expand description
A shorthand for
Bind
::
define
().
init
(
default
).
finish
(cfg)
.
Example
use r3::{bind::{bind, bind_default}, prelude::*,};
const fn configure_app<C>(cfg: &mut Cfg<C>)
where
C: ~const traits::CfgBase<System = System>,
{
let b = bind_default(cfg);
bind((b.borrow(),), |b: &Option<i32>| {
assert!(b.is_none());
}).unpure().finish(cfg);
}