pub struct MenuBuilder { /* private fields */ }
Expand description
A struct for creating a session Menu interactively
Implementations§
Source§impl MenuBuilder
impl MenuBuilder
Sourcepub fn new() -> MenuBuilder
pub fn new() -> MenuBuilder
create an empty Menu
Sourcepub fn register_as<T: JsonSchema + for<'a> Deserialize<'a> + Compilable>(
&mut self,
name: Option<String>,
)
pub fn register_as<T: JsonSchema + for<'a> Deserialize<'a> + Compilable>( &mut self, name: Option<String>, )
register type T with an optional name. If no name is provided, infer it from the type.
Sourcepub fn register_as_from<C: JsonSchema + for<'a> Deserialize<'a>, T: Compilable + TryFrom<C, Error = E>, E>(
&mut self,
name: Option<String>,
)where
SessionError: From<E>,
pub fn register_as_from<C: JsonSchema + for<'a> Deserialize<'a>, T: Compilable + TryFrom<C, Error = E>, E>(
&mut self,
name: Option<String>,
)where
SessionError: From<E>,
register a type T with an optional name and a conversion type C. If no name is provided, infer it from the type C.
Trait Implementations§
Source§impl From<MenuBuilder> for Menu
impl From<MenuBuilder> for Menu
Source§fn from(m: MenuBuilder) -> Self
fn from(m: MenuBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MenuBuilder
impl !RefUnwindSafe for MenuBuilder
impl !Send for MenuBuilder
impl !Sync for MenuBuilder
impl Unpin for MenuBuilder
impl !UnwindSafe for MenuBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more