pub struct DocSnippet {
pub source_file: &'static str,
pub build: fn() -> Box<dyn Widget>,
pub size: Option<(f32, f32)>,
}Expand description
One registered documentation image subject.
Fields§
§source_file: &'static strWorkspace-relative path of the widget’s own source file. Its stem is the catalog page slug the image is filed under.
build: fn() -> Box<dyn Widget>Constructs a fresh instance. A plain fn (not a closure) so the
whole record is a const-constructible static.
size: Option<(f32, f32)>Pin the canvas to this logical size instead of measuring the widget’s intrinsic size. For widgets that fill their parent.
Trait Implementations§
impl Collect for DocSnippet
Auto Trait Implementations§
impl Freeze for DocSnippet
impl RefUnwindSafe for DocSnippet
impl Send for DocSnippet
impl Sync for DocSnippet
impl Unpin for DocSnippet
impl UnsafeUnpin for DocSnippet
impl UnwindSafe for DocSnippet
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