pub struct EntityPane { /* private fields */ }Expand description
A list of an entity’s records beside a form that adds or changes them, with a button on each row to open it and one to take it away. It fits inside a screen an application made itself.
Implementations§
Source§impl EntityPane
impl EntityPane
Sourcepub fn new<S: ObjectSpace + 'static>(
entity: EntityInfo,
space: impl Fn() -> S + 'static,
words: Words,
pane: PaneWords,
) -> Result<Self, ModelError>
pub fn new<S: ObjectSpace + 'static>( entity: EntityInfo, space: impl Fn() -> S + 'static, words: Words, pane: PaneWords, ) -> Result<Self, ModelError>
A pane over this entity. space makes a unit of work for each record opened.
Sourcepub fn on_done(self, handler: impl Fn(&'static str) + 'static) -> Self
pub fn on_done(self, handler: impl Fn(&'static str) + 'static) -> Self
Runs with a word of what was kept or taken away.
Sourcepub fn on_failed(self, handler: impl Fn(String) + 'static) -> Self
pub fn on_failed(self, handler: impl Fn(String) + 'static) -> Self
Runs with what went wrong, in words for people.
Sourcepub fn cell_text(
self,
text: impl Fn(&str, &Object) -> Option<String> + 'static,
) -> Self
pub fn cell_text( self, text: impl Fn(&str, &Object) -> Option<String> + 'static, ) -> Self
Says what a cell shows, when its value alone is not it.
Sourcepub fn beside_from(self, width: f32) -> Self
pub fn beside_from(self, width: f32) -> Self
The window width from which the form goes beside the list. 760 by default.
Trait Implementations§
Source§impl Debug for EntityPane
impl Debug for EntityPane
Auto Trait Implementations§
impl !Freeze for EntityPane
impl !RefUnwindSafe for EntityPane
impl !Send for EntityPane
impl !Sync for EntityPane
impl !UnwindSafe for EntityPane
impl Unpin for EntityPane
impl UnsafeUnpin for EntityPane
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
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<V> ViewExt for Vwhere
V: View,
impl<V> ViewExt for Vwhere
V: View,
Source§fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
Adds padding inside the box, in logical pixels.
Source§fn background(self, fill: impl Into<Fill>) -> Styled<Self>
fn background(self, fill: impl Into<Fill>) -> Styled<Self>
Paints a background behind the content.
Source§fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
Fixes the width and/or height in logical pixels;
None keeps the content size.