Page

Struct Page 

Source
pub struct Page { /* private fields */ }

Trait Implementations§

Source§

impl AsPart<PageData<TypeHolder>> for Page

Source§

fn as_part(&self) -> &PageData<TypeHolder>

Borrow part of composed type.
Source§

fn as_part_mut(&mut self) -> &mut PageData<TypeHolder>

Mutably borrow part of composed type.
Source§

impl AsPart<PageData<TypeHolder>> for Page

Source§

fn as_part(&self) -> &PageData<TypeHolder>

Borrow part of composed type.
Source§

fn as_part_mut(&mut self) -> &mut PageData<TypeHolder>

Mutably borrow part of composed type.
Source§

impl AsPart<PageData<TypeHolder>> for Page

Source§

fn as_part(&self) -> &PageData<TypeHolder>

Borrow part of composed type.
Source§

fn as_part_mut(&mut self) -> &mut PageData<TypeHolder>

Mutably borrow part of composed type.
Source§

impl AsPart<PageData<TypeHolder>> for Page

Source§

fn as_part(&self) -> &PageData<TypeHolder>

Borrow part of composed type.
Source§

fn as_part_mut(&mut self) -> &mut PageData<TypeHolder>

Mutably borrow part of composed type.
Source§

impl Drop for Page

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl EnvAssociatedTypes for Page

Source§

type AssociatedTypesHolder = TypeHolder

Type with the associated types defined on it.
Source§

impl EnvAssociatedTypes for Page

Source§

type AssociatedTypesHolder = TypeHolder

Type with the associated types defined on it.
Source§

impl GetTime for Page

Source§

type Time = Instant

Type for times
Source§

type Duration = Duration

Type for durations
Source§

fn get_time(&mut self) -> Instant

Get the current time.
Source§

fn zero_duration() -> Duration

Value for zero duration.
Source§

fn duration_between(start: &Instant, end: &Instant) -> Duration

Value for zero duration.
Source§

impl Page for Page

Source§

type Event = Events

Events generated by this page.
Source§

fn start_group(&mut self)

Signals the ream is starting processing events for this page. Read more
Source§

fn end_group(&mut self)

Signals the ream has stopped processing events for this page.
Source§

fn next_event_in_group(&mut self) -> Option<Self::Event>

Get the next event in this group of events if there is one.
Source§

fn before_event(&mut self, event: &Self::Event)

Process an event before it is passed to the sketch to handle.
Source§

fn finish_event(&mut self, event: Self::Event)

Process an event after it is passed to the sketch.
Source§

fn status(&self) -> Status

Status of the sketch/page so the ream knows to continue or stop execution.

Auto Trait Implementations§

§

impl Freeze for Page

§

impl !RefUnwindSafe for Page

§

impl Send for Page

§

impl Sync for Page

§

impl Unpin for Page

§

impl !UnwindSafe for Page

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: FloatComponent, Swp: WhitePoint, Dwp: WhitePoint, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<Swp, Dwp, T>,

Convert the source color to the destination color using the specified method
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
Source§

impl<T, S, R, C> IntoShape<S, R, C> for T
where S: ShapeFrom<T, R, C>,

Source§

fn into_shape(self, context: &Context<R, C>) -> Shape<R, C>

Convert the value in relation to a context.
Source§

impl<T> SketchExt for T

Source§

fn stop(&mut self)

Stop running this sketch.
Source§

fn pause(&mut self)

Pause updates for this sketch.
Source§

fn resume(&mut self)

Resume updates for this sketch.
Source§

fn is_paused(&self) -> bool

Check if sketch is paused.
Source§

fn update_rate<R>(&mut self, rate: R)

Set the rate the update handler is called. The environment may not be able to actually call the update handler at the rate given.
Source§

impl<T> SketchExt for T

Source§

fn width( &self, ) -> <<T as EnvAssociatedTypes>::AssociatedTypesHolder as AssociatedTypes>::Real

Get the width of the page.
Source§

fn height( &self, ) -> <<T as EnvAssociatedTypes>::AssociatedTypesHolder as AssociatedTypes>::Real

Get the height of the page.
Source§

fn size( &self, ) -> Size2<<<T as EnvAssociatedTypes>::AssociatedTypesHolder as AssociatedTypes>::Real>

Get the size of the page.
Source§

fn rect_mode(&mut self, mode: Mode)

Get the rectangle mode.
Source§

fn ellipse_mode(&mut self, mode: Mode)

Get the ellipse mode.
Source§

fn fill<C>(&mut self, color: C)

Set the fill color for shapes.
Source§

fn stroke<C>(&mut self, color: C)

Set the stroke color for shapes.
Source§

fn weight<R>(&mut self, width: R)

Set the stroke weight for shapes.
Source§

fn background<C>(&mut self, color: C)

Set the background color of the page. Read more
Source§

fn circle<S>(&mut self, circle: S)

Draw a circle.
Source§

fn rect<S>(&mut self, rectangle: S)

Draw a rectangle.
Source§

fn frame_rate<R>(&mut self, rate: R)

set the frame rate. Read more
Source§

impl<T, X> TryAsPart<X> for T
where T: AsPart<X>,

Source§

fn try_as_part(&self) -> Option<&X>

Try to borrow part of composed type.
Source§

fn try_as_part_mut(&mut self) -> Option<&mut X>

Try to mutably borrow part of composed type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>