wip: layout doctests 2

This commit is contained in:
facile pop culture reference 2026-07-30 18:01:19 +03:00
parent cd5b0cc113
commit 8d2445d728
3 changed files with 4 additions and 12 deletions

View file

@ -247,7 +247,7 @@ impl_draw!(<T: Screen, I: Draw<T>, X: Into<Option<T::Unit>>,>|self: Push<T, I, X
/// assert_eq!("1".pull_x(1).layout(area)?, Some(XYWH(0u16, 1, 1, 1)));
/// assert_eq!("1".pull_y(1).layout(area)?, Some(XYWH(1u16, 0, 1, 1)));
/// assert_eq!("1".pull_xy(1, 1).layout(area)?, Some(XYWH(0u16, 0, 1, 1)));
/// # }
/// # Ok(()) }
/// ```
pub enum Pull<T: Screen, I: Draw<T>, X: Into<Option<T::Unit>>> {
__(PhantomData<T>),

View file

@ -190,18 +190,10 @@ pub fn eval_view <'a, O: Screen + 'a, S> (
/// use tengri::{*, lang::*, ratatui::prelude::Color};
///
/// #[namespace(bool)]
/// #[namespace(u8 try_to_u8)]
/// #[namespace(u16 try_to_u16)]
/// #[namespace(u8)]
/// #[namespace(u16)]
/// #[namespace(Color try_to_color)]
/// #[interpret(Tui -> Option<XYWH<u16>>: try_eval_tui)]
/// struct State;
/// tengri::lang::primitive!(u8: try_to_u8);
/// tengri::lang::primitive!(u16: try_to_u16);
/// tengri::lang::interpret!(|self: State, context: Tui, lang|->Option<XYWH<u16>>{
/// expression = {
/// "text" (...rest) => { todo!() }
/// }
/// });
/// impl Interpret<Tui, Option<XYWH<u16>>> for State {
/// fn interpret_expr <'a> (&'a self, _: &mut Tui, lang: &'a impl Expression)
/// -> Usually<Option<XYWH<u16>>>

View file

@ -803,7 +803,7 @@ pub trait AddMidiOut {
/// Port connection manager.
///
/// ```
/// let connect = tek::Connect::default();
/// let connect = tengri::Connect::default();
/// ```
#[derive(Clone, Debug, Default)]
pub struct Connect {