pub struct AnimationClip { /* private fields */ }
Expand description
A list of VariableCurve
s and the AnimationTargetId
s to which they
apply.
Because animation clips refer to targets by UUID, they can target any
AnimationTarget
with that ID.
Implementations§
Source§impl AnimationClip
impl AnimationClip
Sourcepub fn curves(
&self,
) -> &HashMap<AnimationTargetId, Vec<VariableCurve>, NoOpHash>
pub fn curves( &self, ) -> &HashMap<AnimationTargetId, Vec<VariableCurve>, NoOpHash>
VariableCurve
s for each animation target. Indexed by the AnimationTargetId
.
Sourcepub fn curves_mut(
&mut self,
) -> &mut HashMap<AnimationTargetId, Vec<VariableCurve>, NoOpHash>
pub fn curves_mut( &mut self, ) -> &mut HashMap<AnimationTargetId, Vec<VariableCurve>, NoOpHash>
Get mutable references of VariableCurve
s for each animation target. Indexed by the AnimationTargetId
.
Sourcepub fn curves_for_target(
&self,
target_id: AnimationTargetId,
) -> Option<&Vec<VariableCurve>>
pub fn curves_for_target( &self, target_id: AnimationTargetId, ) -> Option<&Vec<VariableCurve>>
Gets the curves for a single animation target.
Returns None
if this clip doesn’t animate the target.
Sourcepub fn curves_for_target_mut(
&mut self,
target_id: AnimationTargetId,
) -> Option<&mut Vec<VariableCurve>>
pub fn curves_for_target_mut( &mut self, target_id: AnimationTargetId, ) -> Option<&mut Vec<VariableCurve>>
Gets mutable references of the curves for a single animation target.
Returns None
if this clip doesn’t animate the target.
Sourcepub fn set_duration(&mut self, duration_sec: f32)
pub fn set_duration(&mut self, duration_sec: f32)
Set the duration of the clip in seconds.
Examples found in repository?
37fn setup(
38 mut commands: Commands,
39 mut animations: ResMut<Assets<AnimationClip>>,
40 mut graphs: ResMut<Assets<AnimationGraph>>,
41) {
42 // Camera
43 commands.spawn((
44 Camera2d,
45 Camera {
46 clear_color: ClearColorConfig::Custom(BLACK.into()),
47 hdr: true,
48 ..Default::default()
49 },
50 Bloom {
51 intensity: 0.4,
52 ..Bloom::NATURAL
53 },
54 ));
55
56 // The text that will be changed by animation events.
57 commands.spawn((
58 MessageText,
59 Text2d::default(),
60 TextFont {
61 font_size: 119.0,
62 ..default()
63 },
64 TextColor(Color::NONE),
65 ));
66
67 // Create a new animation clip.
68 let mut animation = AnimationClip::default();
69
70 // This is only necessary if you want the duration of the
71 // animation to be longer than the last event in the clip.
72 animation.set_duration(2.0);
73
74 // Add events at the specified time.
75 animation.add_event(
76 0.0,
77 MessageEvent {
78 value: "HELLO".into(),
79 color: ALICE_BLUE.into(),
80 },
81 );
82 animation.add_event(
83 1.0,
84 MessageEvent {
85 value: "BYE".into(),
86 color: CRIMSON.into(),
87 },
88 );
89
90 // Create the animation graph.
91 let (graph, animation_index) = AnimationGraph::from_clip(animations.add(animation));
92 let mut player = AnimationPlayer::default();
93 player.play(animation_index).repeat();
94
95 commands.spawn((AnimationGraphHandle(graphs.add(graph)), player));
96}
Sourcepub fn add_curve_to_target(
&mut self,
target_id: AnimationTargetId,
curve: impl AnimationCurve,
)
pub fn add_curve_to_target( &mut self, target_id: AnimationTargetId, curve: impl AnimationCurve, )
Adds an AnimationCurve
to an AnimationTarget
named by an
AnimationTargetId
.
If the curve extends beyond the current duration of this clip, this method lengthens this clip to include the entire time span that the curve covers.
More specifically:
- This clip will be sampled on the interval
[0, duration]
. - Each curve in the clip is sampled by first clamping the sample time to its domain.
- Curves that extend forever never contribute to the duration.
For example, a curve with domain [2, 5]
will extend the clip to cover [0, 5]
when added and will produce the same output on the entire interval [0, 2]
because
these time values all get clamped to 2
.
By contrast, a curve with domain [-10, ∞]
will never extend the clip duration when
added and will be sampled only on [0, duration]
, ignoring all negative time values.
Examples found in repository?
36 fn create(
37 animation_graphs: &mut Assets<AnimationGraph>,
38 animation_clips: &mut Assets<AnimationClip>,
39 ) -> AnimationInfo {
40 // Create an ID that identifies the text node we're going to animate.
41 let animation_target_name = Name::new("Text");
42 let animation_target_id = AnimationTargetId::from_name(&animation_target_name);
43
44 // Allocate an animation clip.
45 let mut animation_clip = AnimationClip::default();
46
47 // Create a curve that animates font size.
48 animation_clip.add_curve_to_target(
49 animation_target_id,
50 AnimatableCurve::new(
51 animated_field!(TextFont::font_size),
52 AnimatableKeyframeCurve::new(
53 [0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0]
54 .into_iter()
55 .zip([24.0, 80.0, 24.0, 80.0, 24.0, 80.0, 24.0]),
56 )
57 .expect(
58 "should be able to build translation curve because we pass in valid samples",
59 ),
60 ),
61 );
62
63 // Create a curve that animates font color. Note that this should have
64 // the same time duration as the previous curve.
65 //
66 // This time we use a "custom property", which in this case animates TextColor under the assumption
67 // that it is in the "srgba" format.
68 animation_clip.add_curve_to_target(
69 animation_target_id,
70 AnimatableCurve::new(
71 TextColorProperty,
72 AnimatableKeyframeCurve::new([0.0, 1.0, 2.0, 3.0].into_iter().zip([
73 Srgba::RED,
74 Srgba::GREEN,
75 Srgba::BLUE,
76 Srgba::RED,
77 ]))
78 .expect(
79 "should be able to build translation curve because we pass in valid samples",
80 ),
81 ),
82 );
83
84 // Save our animation clip as an asset.
85 let animation_clip_handle = animation_clips.add(animation_clip);
86
87 // Create an animation graph with that clip.
88 let (animation_graph, animation_node_index) =
89 AnimationGraph::from_clip(animation_clip_handle);
90 let animation_graph_handle = animation_graphs.add(animation_graph);
91
92 AnimationInfo {
93 target_name: animation_target_name,
94 target_id: animation_target_id,
95 graph: animation_graph_handle,
96 node_index: animation_node_index,
97 }
98 }
More examples
93 fn create(
94 animation_graphs: &mut Assets<AnimationGraph>,
95 animation_clips: &mut Assets<AnimationClip>,
96 ) -> AnimationInfo {
97 // Create an ID that identifies the text node we're going to animate.
98 let animation_target_name = Name::new("Cube");
99 let animation_target_id = AnimationTargetId::from_name(&animation_target_name);
100
101 // Allocate an animation clip.
102 let mut animation_clip = AnimationClip::default();
103
104 // Each leg of the translation motion should take 3 seconds.
105 let animation_domain = interval(0.0, 3.0).unwrap();
106
107 // The easing curve is parametrized over [0, 1], so we reparametrize it and
108 // then ping-pong, which makes it spend another 3 seconds on the return journey.
109 let translation_curve = EasingCurve::new(
110 vec3(-6., 2., 0.),
111 vec3(6., 2., 0.),
112 EaseFunction::CubicInOut,
113 )
114 .reparametrize_linear(animation_domain)
115 .expect("this curve has bounded domain, so this should never fail")
116 .ping_pong()
117 .expect("this curve has bounded domain, so this should never fail");
118
119 // Something similar for rotation. The repetition here is an illusion caused
120 // by the symmetry of the cube; it rotates on the forward journey and never
121 // rotates back.
122 let rotation_curve = EasingCurve::new(
123 Quat::IDENTITY,
124 Quat::from_rotation_y(FRAC_PI_2),
125 EaseFunction::ElasticInOut,
126 )
127 .reparametrize_linear(interval(0.0, 4.0).unwrap())
128 .expect("this curve has bounded domain, so this should never fail");
129
130 animation_clip.add_curve_to_target(
131 animation_target_id,
132 AnimatableCurve::new(animated_field!(Transform::translation), translation_curve),
133 );
134 animation_clip.add_curve_to_target(
135 animation_target_id,
136 AnimatableCurve::new(animated_field!(Transform::rotation), rotation_curve),
137 );
138
139 // Save our animation clip as an asset.
140 let animation_clip_handle = animation_clips.add(animation_clip);
141
142 // Create an animation graph with that clip.
143 let (animation_graph, animation_node_index) =
144 AnimationGraph::from_clip(animation_clip_handle);
145 let animation_graph_handle = animation_graphs.add(animation_graph);
146
147 AnimationInfo {
148 target_name: animation_target_name,
149 target_id: animation_target_id,
150 graph: animation_graph_handle,
151 node_index: animation_node_index,
152 }
153 }
22fn setup(
23 mut commands: Commands,
24 mut meshes: ResMut<Assets<Mesh>>,
25 mut materials: ResMut<Assets<StandardMaterial>>,
26 mut animations: ResMut<Assets<AnimationClip>>,
27 mut graphs: ResMut<Assets<AnimationGraph>>,
28) {
29 // Camera
30 commands.spawn((
31 Camera3d::default(),
32 Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y),
33 ));
34
35 // Light
36 commands.spawn((
37 PointLight {
38 intensity: 500_000.0,
39 ..default()
40 },
41 Transform::from_xyz(0.0, 2.5, 0.0),
42 ));
43
44 // Let's use the `Name` component to target entities. We can use anything we
45 // like, but names are convenient.
46 let planet = Name::new("planet");
47 let orbit_controller = Name::new("orbit_controller");
48 let satellite = Name::new("satellite");
49
50 // Creating the animation
51 let mut animation = AnimationClip::default();
52 // A curve can modify a single part of a transform: here, the translation.
53 let planet_animation_target_id = AnimationTargetId::from_name(&planet);
54 animation.add_curve_to_target(
55 planet_animation_target_id,
56 AnimatableCurve::new(
57 animated_field!(Transform::translation),
58 UnevenSampleAutoCurve::new([0.0, 1.0, 2.0, 3.0, 4.0].into_iter().zip([
59 Vec3::new(1.0, 0.0, 1.0),
60 Vec3::new(-1.0, 0.0, 1.0),
61 Vec3::new(-1.0, 0.0, -1.0),
62 Vec3::new(1.0, 0.0, -1.0),
63 // in case seamless looping is wanted, the last keyframe should
64 // be the same as the first one
65 Vec3::new(1.0, 0.0, 1.0),
66 ]))
67 .expect("should be able to build translation curve because we pass in valid samples"),
68 ),
69 );
70 // Or it can modify the rotation of the transform.
71 // To find the entity to modify, the hierarchy will be traversed looking for
72 // an entity with the right name at each level.
73 let orbit_controller_animation_target_id =
74 AnimationTargetId::from_names([planet.clone(), orbit_controller.clone()].iter());
75 animation.add_curve_to_target(
76 orbit_controller_animation_target_id,
77 AnimatableCurve::new(
78 animated_field!(Transform::rotation),
79 UnevenSampleAutoCurve::new([0.0, 1.0, 2.0, 3.0, 4.0].into_iter().zip([
80 Quat::IDENTITY,
81 Quat::from_axis_angle(Vec3::Y, PI / 2.),
82 Quat::from_axis_angle(Vec3::Y, PI / 2. * 2.),
83 Quat::from_axis_angle(Vec3::Y, PI / 2. * 3.),
84 Quat::IDENTITY,
85 ]))
86 .expect("Failed to build rotation curve"),
87 ),
88 );
89 // If a curve in an animation is shorter than the other, it will not repeat
90 // until all other curves are finished. In that case, another animation should
91 // be created for each part that would have a different duration / period.
92 let satellite_animation_target_id = AnimationTargetId::from_names(
93 [planet.clone(), orbit_controller.clone(), satellite.clone()].iter(),
94 );
95 animation.add_curve_to_target(
96 satellite_animation_target_id,
97 AnimatableCurve::new(
98 animated_field!(Transform::scale),
99 UnevenSampleAutoCurve::new(
100 [0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0]
101 .into_iter()
102 .zip([
103 Vec3::splat(0.8),
104 Vec3::splat(1.2),
105 Vec3::splat(0.8),
106 Vec3::splat(1.2),
107 Vec3::splat(0.8),
108 Vec3::splat(1.2),
109 Vec3::splat(0.8),
110 Vec3::splat(1.2),
111 Vec3::splat(0.8),
112 ]),
113 )
114 .expect("Failed to build scale curve"),
115 ),
116 );
117 // There can be more than one curve targeting the same entity path.
118 animation.add_curve_to_target(
119 AnimationTargetId::from_names(
120 [planet.clone(), orbit_controller.clone(), satellite.clone()].iter(),
121 ),
122 AnimatableCurve::new(
123 animated_field!(Transform::rotation),
124 UnevenSampleAutoCurve::new([0.0, 1.0, 2.0, 3.0, 4.0].into_iter().zip([
125 Quat::IDENTITY,
126 Quat::from_axis_angle(Vec3::Y, PI / 2.),
127 Quat::from_axis_angle(Vec3::Y, PI / 2. * 2.),
128 Quat::from_axis_angle(Vec3::Y, PI / 2. * 3.),
129 Quat::IDENTITY,
130 ]))
131 .expect("should be able to build translation curve because we pass in valid samples"),
132 ),
133 );
134
135 // Create the animation graph
136 let (graph, animation_index) = AnimationGraph::from_clip(animations.add(animation));
137
138 // Create the animation player, and set it to repeat
139 let mut player = AnimationPlayer::default();
140 player.play(animation_index).repeat();
141
142 // Create the scene that will be animated
143 // First entity is the planet
144 let planet_entity = commands
145 .spawn((
146 Mesh3d(meshes.add(Sphere::default())),
147 MeshMaterial3d(materials.add(Color::srgb(0.8, 0.7, 0.6))),
148 // Add the animation graph and player
149 planet,
150 AnimationGraphHandle(graphs.add(graph)),
151 player,
152 ))
153 .id();
154 commands
155 .entity(planet_entity)
156 .insert(AnimationTarget {
157 id: planet_animation_target_id,
158 player: planet_entity,
159 })
160 .with_children(|p| {
161 // This entity is just used for animation, but doesn't display anything
162 p.spawn((
163 Transform::default(),
164 Visibility::default(),
165 orbit_controller,
166 AnimationTarget {
167 id: orbit_controller_animation_target_id,
168 player: planet_entity,
169 },
170 ))
171 .with_children(|p| {
172 // The satellite, placed at a distance of the planet
173 p.spawn((
174 Mesh3d(meshes.add(Cuboid::new(0.5, 0.5, 0.5))),
175 MeshMaterial3d(materials.add(Color::srgb(0.3, 0.9, 0.3))),
176 Transform::from_xyz(1.5, 0.0, 0.0),
177 AnimationTarget {
178 id: satellite_animation_target_id,
179 player: planet_entity,
180 },
181 satellite,
182 ));
183 });
184 });
185}
Sourcepub fn add_variable_curve_to_target(
&mut self,
target_id: AnimationTargetId,
variable_curve: VariableCurve,
)
pub fn add_variable_curve_to_target( &mut self, target_id: AnimationTargetId, variable_curve: VariableCurve, )
Like add_curve_to_target
, but adding a VariableCurve
directly.
Under normal circumstances, that method is generally more convenient.
Sourcepub fn add_event(&mut self, time: f32, event: impl Event + Clone)
pub fn add_event(&mut self, time: f32, event: impl Event + Clone)
Add a untargeted Event
to this AnimationClip
.
The event
will be cloned and triggered on the AnimationPlayer
entity once the time
(in seconds)
is reached in the animation.
See also add_event_to_target
.
Examples found in repository?
37fn setup(
38 mut commands: Commands,
39 mut animations: ResMut<Assets<AnimationClip>>,
40 mut graphs: ResMut<Assets<AnimationGraph>>,
41) {
42 // Camera
43 commands.spawn((
44 Camera2d,
45 Camera {
46 clear_color: ClearColorConfig::Custom(BLACK.into()),
47 hdr: true,
48 ..Default::default()
49 },
50 Bloom {
51 intensity: 0.4,
52 ..Bloom::NATURAL
53 },
54 ));
55
56 // The text that will be changed by animation events.
57 commands.spawn((
58 MessageText,
59 Text2d::default(),
60 TextFont {
61 font_size: 119.0,
62 ..default()
63 },
64 TextColor(Color::NONE),
65 ));
66
67 // Create a new animation clip.
68 let mut animation = AnimationClip::default();
69
70 // This is only necessary if you want the duration of the
71 // animation to be longer than the last event in the clip.
72 animation.set_duration(2.0);
73
74 // Add events at the specified time.
75 animation.add_event(
76 0.0,
77 MessageEvent {
78 value: "HELLO".into(),
79 color: ALICE_BLUE.into(),
80 },
81 );
82 animation.add_event(
83 1.0,
84 MessageEvent {
85 value: "BYE".into(),
86 color: CRIMSON.into(),
87 },
88 );
89
90 // Create the animation graph.
91 let (graph, animation_index) = AnimationGraph::from_clip(animations.add(animation));
92 let mut player = AnimationPlayer::default();
93 player.play(animation_index).repeat();
94
95 commands.spawn((AnimationGraphHandle(graphs.add(graph)), player));
96}
Sourcepub fn add_event_to_target(
&mut self,
target_id: AnimationTargetId,
time: f32,
event: impl Event + Clone,
)
pub fn add_event_to_target( &mut self, target_id: AnimationTargetId, time: f32, event: impl Event + Clone, )
Add an Event
to an AnimationTarget
named by an AnimationTargetId
.
The event
will be cloned and triggered on the entity matching the target once the time
(in seconds)
is reached in the animation.
Use add_event
instead if you don’t have a specific target.
Examples found in repository?
137fn setup_scene_once_loaded(
138 mut commands: Commands,
139 animations: Res<Animations>,
140 feet: Res<FoxFeetTargets>,
141 graphs: Res<Assets<AnimationGraph>>,
142 mut clips: ResMut<Assets<AnimationClip>>,
143 mut players: Query<(Entity, &mut AnimationPlayer), Added<AnimationPlayer>>,
144) {
145 fn get_clip<'a>(
146 node: AnimationNodeIndex,
147 graph: &AnimationGraph,
148 clips: &'a mut Assets<AnimationClip>,
149 ) -> &'a mut AnimationClip {
150 let node = graph.get(node).unwrap();
151 let clip = match &node.node_type {
152 AnimationNodeType::Clip(handle) => clips.get_mut(handle),
153 _ => unreachable!(),
154 };
155 clip.unwrap()
156 }
157
158 for (entity, mut player) in &mut players {
159 // Send `OnStep` events once the fox feet hits the ground in the running animation.
160
161 let graph = graphs.get(&animations.graph_handle).unwrap();
162 let running_animation = get_clip(animations.index, graph, &mut clips);
163
164 // You can determine the time an event should trigger if you know witch frame it occurs and
165 // the frame rate of the animation. Let's say we want to trigger an event at frame 15,
166 // and the animation has a frame rate of 24 fps, then time = 15 / 24 = 0.625.
167 running_animation.add_event_to_target(feet.front_left, 0.625, OnStep);
168 running_animation.add_event_to_target(feet.front_right, 0.5, OnStep);
169 running_animation.add_event_to_target(feet.back_left, 0.0, OnStep);
170 running_animation.add_event_to_target(feet.back_right, 0.125, OnStep);
171
172 // Start the animation
173
174 let mut transitions = AnimationTransitions::new();
175
176 // Make sure to start the animation via the `AnimationTransitions`
177 // component. The `AnimationTransitions` component wants to manage all
178 // the animations and will get confused if the animations are started
179 // directly via the `AnimationPlayer`.
180 transitions
181 .play(&mut player, animations.index, Duration::ZERO)
182 .repeat();
183
184 commands
185 .entity(entity)
186 .insert(AnimationGraphHandle(animations.graph_handle.clone()))
187 .insert(transitions);
188 }
189}
Sourcepub fn add_event_fn(
&mut self,
time: f32,
func: impl Fn(&mut Commands<'_, '_>, Entity, f32, f32) + Send + Sync + 'static,
)
pub fn add_event_fn( &mut self, time: f32, func: impl Fn(&mut Commands<'_, '_>, Entity, f32, f32) + Send + Sync + 'static, )
Add a untargeted event function to this AnimationClip
.
The func
will trigger on the AnimationPlayer
entity once the time
(in seconds)
is reached in the animation.
For a simpler Event
-based alternative, see AnimationClip::add_event
.
See also add_event_to_target
.
clip.add_event_fn(1.0, |commands, entity, time, weight| {
println!("Animation Event Triggered {entity:#?} at time {time} with weight {weight}");
})
Sourcepub fn add_event_fn_to_target(
&mut self,
target_id: AnimationTargetId,
time: f32,
func: impl Fn(&mut Commands<'_, '_>, Entity, f32, f32) + Send + Sync + 'static,
)
pub fn add_event_fn_to_target( &mut self, target_id: AnimationTargetId, time: f32, func: impl Fn(&mut Commands<'_, '_>, Entity, f32, f32) + Send + Sync + 'static, )
Add an event function to an AnimationTarget
named by an AnimationTargetId
.
The func
will trigger on the entity matching the target once the time
(in seconds)
is reached in the animation.
For a simpler Event
-based alternative, see AnimationClip::add_event_to_target
.
Use add_event
instead if you don’t have a specific target.
clip.add_event_fn_to_target(AnimationTargetId::from_iter(["Arm", "Hand"]), 1.0, |commands, entity, time, weight| {
println!("Animation Event Triggered {entity:#?} at time {time} with weight {weight}");
})
Trait Implementations§
Source§impl Clone for AnimationClip
impl Clone for AnimationClip
Source§fn clone(&self) -> AnimationClip
fn clone(&self) -> AnimationClip
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AnimationClip
impl Debug for AnimationClip
Source§impl Default for AnimationClip
impl Default for AnimationClip
Source§fn default() -> AnimationClip
fn default() -> AnimationClip
Source§impl FromArg for &'static AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl FromArg for &'static AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl FromArg for &'static mut AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl FromArg for &'static mut AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl FromArg for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl FromArg for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl FromReflect for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl FromReflect for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn from_reflect(
reflect: &(dyn PartialReflect + 'static),
) -> Option<AnimationClip>
fn from_reflect( reflect: &(dyn PartialReflect + 'static), ) -> Option<AnimationClip>
Self
from a reflected value.Source§fn take_from_reflect(
reflect: Box<dyn PartialReflect>,
) -> Result<Self, Box<dyn PartialReflect>>
fn take_from_reflect( reflect: Box<dyn PartialReflect>, ) -> Result<Self, Box<dyn PartialReflect>>
Self
using,
constructing the value using from_reflect
if that fails. Read moreSource§impl GetOwnership for &AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl GetOwnership for &AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl GetOwnership for &mut AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl GetOwnership for &mut AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl GetOwnership for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl GetOwnership for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl GetTypeRegistration for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl GetTypeRegistration for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn get_type_registration() -> TypeRegistration
fn get_type_registration() -> TypeRegistration
TypeRegistration
for this type.Source§fn register_type_dependencies(registry: &mut TypeRegistry)
fn register_type_dependencies(registry: &mut TypeRegistry)
Source§impl IntoReturn for &AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl IntoReturn for &AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn into_return<'into_return>(self) -> Return<'into_return>where
&AnimationClip: 'into_return,
fn into_return<'into_return>(self) -> Return<'into_return>where
&AnimationClip: 'into_return,
Source§impl IntoReturn for &mut AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl IntoReturn for &mut AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn into_return<'into_return>(self) -> Return<'into_return>where
&mut AnimationClip: 'into_return,
fn into_return<'into_return>(self) -> Return<'into_return>where
&mut AnimationClip: 'into_return,
Source§impl IntoReturn for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl IntoReturn for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn into_return<'into_return>(self) -> Return<'into_return>where
AnimationClip: 'into_return,
fn into_return<'into_return>(self) -> Return<'into_return>where
AnimationClip: 'into_return,
Source§impl PartialReflect for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl PartialReflect for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
Source§fn try_apply(
&mut self,
value: &(dyn PartialReflect + 'static),
) -> Result<(), ApplyError>
fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>
Source§fn reflect_kind(&self) -> ReflectKind
fn reflect_kind(&self) -> ReflectKind
Source§fn reflect_ref(&self) -> ReflectRef<'_>
fn reflect_ref(&self) -> ReflectRef<'_>
Source§fn reflect_mut(&mut self) -> ReflectMut<'_>
fn reflect_mut(&mut self) -> ReflectMut<'_>
Source§fn reflect_owned(self: Box<AnimationClip>) -> ReflectOwned
fn reflect_owned(self: Box<AnimationClip>) -> ReflectOwned
Source§fn try_into_reflect(
self: Box<AnimationClip>,
) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
fn try_into_reflect( self: Box<AnimationClip>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
Source§fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>
fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>
Source§fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>
fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>
Source§fn into_partial_reflect(self: Box<AnimationClip>) -> Box<dyn PartialReflect>
fn into_partial_reflect(self: Box<AnimationClip>) -> Box<dyn PartialReflect>
Source§fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)
fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)
Source§fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)
fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)
Source§fn reflect_partial_eq(
&self,
value: &(dyn PartialReflect + 'static),
) -> Option<bool>
fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>
Source§fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
Self
using reflection. Read moreSource§fn apply(&mut self, value: &(dyn PartialReflect + 'static))
fn apply(&mut self, value: &(dyn PartialReflect + 'static))
Source§fn clone_value(&self) -> Box<dyn PartialReflect>
fn clone_value(&self) -> Box<dyn PartialReflect>
reflect_clone
. To convert reflected values to dynamic ones, use to_dynamic
.Self
into its dynamic representation. Read moreSource§fn to_dynamic(&self) -> Box<dyn PartialReflect>
fn to_dynamic(&self) -> Box<dyn PartialReflect>
Source§fn reflect_hash(&self) -> Option<u64>
fn reflect_hash(&self) -> Option<u64>
Source§fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Source§fn is_dynamic(&self) -> bool
fn is_dynamic(&self) -> bool
Source§impl Reflect for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl Reflect for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn into_any(self: Box<AnimationClip>) -> Box<dyn Any>
fn into_any(self: Box<AnimationClip>) -> Box<dyn Any>
Box<dyn Any>
. Read moreSource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut dyn Any
. Read moreSource§fn into_reflect(self: Box<AnimationClip>) -> Box<dyn Reflect>
fn into_reflect(self: Box<AnimationClip>) -> Box<dyn Reflect>
Source§fn as_reflect(&self) -> &(dyn Reflect + 'static)
fn as_reflect(&self) -> &(dyn Reflect + 'static)
Source§fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
Source§impl Struct for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl Struct for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn field(&self, name: &str) -> Option<&(dyn PartialReflect + 'static)>
fn field(&self, name: &str) -> Option<&(dyn PartialReflect + 'static)>
name
as a &dyn PartialReflect
.Source§fn field_mut(
&mut self,
name: &str,
) -> Option<&mut (dyn PartialReflect + 'static)>
fn field_mut( &mut self, name: &str, ) -> Option<&mut (dyn PartialReflect + 'static)>
name
as a
&mut dyn PartialReflect
.Source§fn field_at(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>
fn field_at(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>
index
as a
&dyn PartialReflect
.Source§fn field_at_mut(
&mut self,
index: usize,
) -> Option<&mut (dyn PartialReflect + 'static)>
fn field_at_mut( &mut self, index: usize, ) -> Option<&mut (dyn PartialReflect + 'static)>
index
as a &mut dyn PartialReflect
.Source§fn name_at(&self, index: usize) -> Option<&str>
fn name_at(&self, index: usize) -> Option<&str>
index
.Source§fn iter_fields(&self) -> FieldIter<'_> ⓘ
fn iter_fields(&self) -> FieldIter<'_> ⓘ
fn to_dynamic_struct(&self) -> DynamicStruct
Source§fn clone_dynamic(&self) -> DynamicStruct
fn clone_dynamic(&self) -> DynamicStruct
to_dynamic_struct
insteadDynamicStruct
.Source§fn get_represented_struct_info(&self) -> Option<&'static StructInfo>
fn get_represented_struct_info(&self) -> Option<&'static StructInfo>
None
if TypeInfo
is not available.Source§impl TypePath for AnimationClip
impl TypePath for AnimationClip
Source§fn type_path() -> &'static str
fn type_path() -> &'static str
Source§fn short_type_path() -> &'static str
fn short_type_path() -> &'static str
Source§fn type_ident() -> Option<&'static str>
fn type_ident() -> Option<&'static str>
Source§fn crate_name() -> Option<&'static str>
fn crate_name() -> Option<&'static str>
Source§impl Typed for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl Typed for AnimationClipwhere
AnimationClip: Any + Send + Sync,
HashMap<AnimationEventTarget, Vec<TimedAnimationEvent>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
f32: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl VisitAssetDependencies for AnimationClip
impl VisitAssetDependencies for AnimationClip
fn visit_dependencies(&self, visit: &mut impl FnMut(UntypedAssetId))
impl Asset for AnimationClip
Auto Trait Implementations§
impl Freeze for AnimationClip
impl !RefUnwindSafe for AnimationClip
impl Send for AnimationClip
impl Sync for AnimationClip
impl Unpin for AnimationClip
impl !UnwindSafe for AnimationClip
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.Source§impl<A> AssetContainer for Awhere
A: Asset,
impl<A> AssetContainer for Awhere
A: Asset,
fn insert(self: Box<A>, id: UntypedAssetId, world: &mut World)
fn asset_type_name(&self) -> &'static str
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DynamicTypePath for Twhere
T: TypePath,
impl<T> DynamicTypePath for Twhere
T: TypePath,
Source§fn reflect_type_path(&self) -> &str
fn reflect_type_path(&self) -> &str
TypePath::type_path
.Source§fn reflect_short_type_path(&self) -> &str
fn reflect_short_type_path(&self) -> &str
Source§fn reflect_type_ident(&self) -> Option<&str>
fn reflect_type_ident(&self) -> Option<&str>
TypePath::type_ident
.Source§fn reflect_crate_name(&self) -> Option<&str>
fn reflect_crate_name(&self) -> Option<&str>
TypePath::crate_name
.Source§fn reflect_module_path(&self) -> Option<&str>
fn reflect_module_path(&self) -> Option<&str>
Source§impl<T> DynamicTyped for Twhere
T: Typed,
impl<T> DynamicTyped for Twhere
T: Typed,
Source§fn reflect_type_info(&self) -> &'static TypeInfo
fn reflect_type_info(&self) -> &'static TypeInfo
Typed::type_info
.Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self
using default()
.
Source§impl<S> GetField for Swhere
S: Struct,
impl<S> GetField for Swhere
S: Struct,
Source§impl<T> GetPath for T
impl<T> GetPath for T
Source§fn reflect_path<'p>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
path
. Read moreSource§fn reflect_path_mut<'p>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
path
. Read moreSource§fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
path
. Read moreSource§fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
path
. Read moreSource§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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.