Struct scribl_curves::DrawSnippets[][src]

pub struct DrawSnippets { /* fields omitted */ }

A collection of DrawSnippets, which can be accessed using their id.

This struct implements druid::Data. In particular, it is cheap to clone: most of the actual data lives behind shared references.

Implementations

impl DrawSnippets[src]

pub fn with_new_snippet(
    &self,
    snip: DrawSnippet
) -> (DrawSnippets, DrawSnippetId)
[src]

pub fn with_replacement_snippet(
    &self,
    id: DrawSnippetId,
    new: DrawSnippet
) -> DrawSnippets
[src]

pub fn without_snippet(&self, id: DrawSnippetId) -> DrawSnippets[src]

pub fn with_new_lerp(
    &self,
    id: DrawSnippetId,
    lerp_from: Time,
    lerp_to: Time
) -> DrawSnippets
[src]

pub fn with_truncated_snippet(
    &self,
    id: DrawSnippetId,
    time: Time
) -> DrawSnippets
[src]

pub fn with_shifted_snippet(
    &self,
    id: DrawSnippetId,
    shift: TimeDiff
) -> DrawSnippets
[src]

pub fn snippet(&self, id: DrawSnippetId) -> &DrawSnippet[src]

pub fn snippets(&self) -> impl Iterator<Item = (DrawSnippetId, &DrawSnippet)>[src]

pub fn last_draw_time(&self) -> Time[src]

pub fn create_cursor(&self, time: Time) -> DrawCursor[src]

Trait Implementations

impl Clone for DrawSnippets[src]

impl Data for DrawSnippets[src]

impl Default for DrawSnippets[src]

impl<'de> Deserialize<'de> for DrawSnippets[src]

impl From<DrawSnippets> for DrawSnippets[src]

impl Serialize for DrawSnippets[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.