pub enum TextSelector {
Range {
based_on: TextUnit,
units: RangeUnits,
start: Animated<f32>,
end: Animated<f32>,
offset: Animated<f32>,
shape: RangeShape,
amount: Animated<f32>,
},
Timing {
state: RunState,
ramp: MediaTime,
sweep: bool,
},
Class {
class: String,
},
}Expand description
How an animator selects characters.
Variants§
Range
A range over the text’s units, shaped at its ends, like After Effects’ range selector.
Fields
§
based_on: TextUnitWhat the range counts: characters (the default), non-space characters, words, or lines.
§
units: RangeUnitsWhether start, end and offset are percents of the units (the default) or unit indices.
§
start: Animated<f32>Where the range starts: [-100, 200] percent, or [-N, 2N] units for N of
MAX_RANGE_INDEX. Default 0.
§
shape: RangeShapeHow selection rises and falls across the range.
Timing
Characters of timed runs, by the run’s time against the current time.
Fields
Class
Characters of runs that carry a class.
Trait Implementations§
Source§impl Clone for TextSelector
impl Clone for TextSelector
Source§impl Debug for TextSelector
impl Debug for TextSelector
Source§impl<'de> Deserialize<'de> for TextSelector
impl<'de> Deserialize<'de> for TextSelector
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TextSelector
impl PartialEq for TextSelector
Source§impl Serialize for TextSelector
impl Serialize for TextSelector
impl StructuralPartialEq for TextSelector
Auto Trait Implementations§
impl Freeze for TextSelector
impl RefUnwindSafe for TextSelector
impl Send for TextSelector
impl Sync for TextSelector
impl Unpin for TextSelector
impl UnsafeUnpin for TextSelector
impl UnwindSafe for TextSelector
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