pub struct Preview { /* private fields */ }Expand description
Describes a view component preview.
Implementations§
Source§impl Preview
impl Preview
Sourcepub fn new<S: ToString>(
name: S,
render: Rc<RefCell<dyn FnMut() -> VirtualNode>>,
) -> Self
pub fn new<S: ToString>( name: S, render: Rc<RefCell<dyn FnMut() -> VirtualNode>>, ) -> Self
Create a new Preview.
Sourcepub fn name_url_friendly(&self) -> &String
pub fn name_url_friendly(&self) -> &String
A URL friendly version of the name.
Sourcepub fn description(&self) -> &Option<String>
pub fn description(&self) -> &Option<String>
The preview’s description.
Sourcepub fn set_description(&mut self, description: Option<String>)
pub fn set_description(&mut self, description: Option<String>)
The preview’s description.
Auto Trait Implementations§
impl Freeze for Preview
impl !RefUnwindSafe for Preview
impl !Send for Preview
impl !Sync for Preview
impl Unpin for Preview
impl !UnwindSafe for Preview
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