Struct percy_preview::Preview
source · [−]pub struct Preview { /* private fields */ }
Expand description
Describes a view component preview.
Implementations
sourceimpl 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 !RefUnwindSafe for Preview
impl !Send for Preview
impl !Sync for Preview
impl Unpin for Preview
impl !UnwindSafe for Preview
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more