pub struct DrawSnippets { /* private fields */ }
Expand description
A collection of DrawSnippet
s, 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§
Source§impl DrawSnippets
impl DrawSnippets
pub fn with_new_snippet( &self, snip: DrawSnippet, ) -> (DrawSnippets, DrawSnippetId)
pub fn with_replacement_snippet( &self, id: DrawSnippetId, new: DrawSnippet, ) -> DrawSnippets
pub fn without_snippet(&self, id: DrawSnippetId) -> DrawSnippets
pub fn with_new_lerp( &self, id: DrawSnippetId, lerp_from: Time, lerp_to: Time, ) -> DrawSnippets
pub fn with_truncated_snippet( &self, id: DrawSnippetId, time: Time, ) -> DrawSnippets
pub fn with_shifted_snippet( &self, id: DrawSnippetId, shift: TimeDiff, ) -> DrawSnippets
pub fn snippet(&self, id: DrawSnippetId) -> &DrawSnippet
pub fn snippets(&self) -> impl Iterator<Item = (DrawSnippetId, &DrawSnippet)>
pub fn last_draw_time(&self) -> Time
pub fn create_cursor(&self, time: Time) -> DrawCursor
Trait Implementations§
Source§impl Clone for DrawSnippets
impl Clone for DrawSnippets
Source§fn clone(&self) -> DrawSnippets
fn clone(&self) -> DrawSnippets
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Data for DrawSnippets
impl Data for DrawSnippets
Source§impl Default for DrawSnippets
impl Default for DrawSnippets
Source§fn default() -> DrawSnippets
fn default() -> DrawSnippets
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DrawSnippets
impl<'de> Deserialize<'de> for DrawSnippets
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<DrawSnippets, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<DrawSnippets, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<DrawSnippets> for DrawSnippets
impl From<DrawSnippets> for DrawSnippets
Source§fn from(data: DrawSnippets) -> DrawSnippets
fn from(data: DrawSnippets) -> DrawSnippets
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DrawSnippets
impl RefUnwindSafe for DrawSnippets
impl Send for DrawSnippets
impl Sync for DrawSnippets
impl Unpin for DrawSnippets
impl UnwindSafe for DrawSnippets
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