pub struct DeviceFrameProps {
pub device: DeviceFrameDevice,
pub orientation: Option<DeviceFrameOrientation>,
pub tone: DeviceFrameTone,
pub color: Option<String>,
pub screen_width: Option<f64>,
pub screen_height: Option<f64>,
pub scroll: bool,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
pub children: Element,
}Expand description
Props for DeviceFrame.
Fields§
§device: DeviceFrameDeviceThe device.
orientation: Option<DeviceFrameOrientation>Forces portrait or landscape.
tone: DeviceFrameToneHardware finish.
color: Option<String>Hardware color: white, black, or a hex color.
screen_width: Option<f64>Screen width in CSS pixels, from 1 to 16384.
screen_height: Option<f64>Screen height in CSS pixels, from 1 to 16384.
scroll: boolLets the screen content scroll. On by default.
class: Option<String>Extra classes appended after the Lumen class.
attributes: Vec<Attribute>Any other <div> or global attribute.
children: ElementScreen content: an image, an iframe, or live markup.
Implementations§
Source§impl DeviceFrameProps
impl DeviceFrameProps
Sourcepub fn builder() -> DeviceFramePropsBuilder<((), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> DeviceFramePropsBuilder<((), (), (), (), (), (), (), (), (), ())>
Create a builder for building DeviceFrameProps.
On the builder, call .device(...)(optional), .orientation(...)(optional), .tone(...)(optional), .color(...)(optional), .screen_width(...)(optional), .screen_height(...)(optional), .scroll(...)(optional), .class(...)(optional), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of DeviceFrameProps.
Trait Implementations§
Source§impl Clone for DeviceFrameProps
impl Clone for DeviceFrameProps
Source§impl PartialEq for DeviceFrameProps
impl PartialEq for DeviceFrameProps
Source§impl Properties for DeviceFramePropswhere
Self: Clone,
impl Properties for DeviceFramePropswhere
Self: Clone,
Source§type Builder = DeviceFramePropsBuilder<((), (), (), (), (), (), (), (), (), ())>
type Builder = DeviceFramePropsBuilder<((), (), (), (), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Source§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
impl StructuralPartialEq for DeviceFrameProps
Auto Trait Implementations§
impl !Freeze for DeviceFrameProps
impl !RefUnwindSafe for DeviceFrameProps
impl !Send for DeviceFrameProps
impl !Sync for DeviceFrameProps
impl !UnwindSafe for DeviceFrameProps
impl Forget for DeviceFrameProps
impl Move for DeviceFrameProps
impl Unpin for DeviceFrameProps
impl UnsafeUnpin for DeviceFramePropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
*const RcInner<VNodeInner> is !null: UnsafeUnpin,
PhantomData<RcInner<VNodeInner>>: UnsafeUnpin,
*const ArcInner<Error> is !null: UnsafeUnpin,
PhantomData<ArcInner<Error>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more