#[non_exhaustive]pub enum Action {
Show 70 variants
MoveSteps {
steps: Reporter,
},
TurnRight {
deg: Reporter,
},
TurnLeft {
deg: Reporter,
},
GoTo {
loc: Reporter,
},
GoToXY {
x: Reporter,
y: Reporter,
},
GlideSecsTo {
secs: Reporter,
loc: Reporter,
},
GlideSecsToXY {
secs: Reporter,
x: Reporter,
y: Reporter,
},
PointInDirection {
dir: Reporter,
},
PointTowards {
loc: Reporter,
},
ChangeXBy {
inc: Reporter,
},
SetXTo {
x: Reporter,
},
ChangeYBy {
inc: Reporter,
},
SetYTo {
y: Reporter,
},
IfOnEdgeBounce,
SetRotationStyle {
style: RotationStyle,
},
SayForSeconds {
content: Reporter,
secs: Reporter,
},
Say {
content: Reporter,
},
ThinkForSeconds {
content: Reporter,
secs: Reporter,
},
Think {
content: Reporter,
},
SwitchCostumeTo {
costume: Reporter,
},
NextCostume,
SwitchBackdropTo {
backdrop: Reporter,
},
SwitchBackdropToAndWait {
backdrop: Reporter,
},
NextBackdrop,
ChangeSizeBy {
inc: Reporter,
},
SetSizeTo {
size: Reporter,
},
ChangeGraphicEffectBy {
effect: GraphicEffectField,
inc: Reporter,
},
SetGraphicEffectTo {
effect: GraphicEffectField,
val: Reporter,
},
ClearGraphicEffects,
Show,
Hide,
GoToLayer {
front_back: FrontBackField,
},
GoLayers {
forward_backward: ForwardBackwardField,
num: Reporter,
},
PlaySoundUntilDone {
sound: Reporter,
},
PlaySound {
sound: Reporter,
},
StopAllSounds,
ChangeSoundEffectBy {
effect: SoundEffectField,
inc: Reporter,
},
SetSoundEffectTo {
effect: SoundEffectField,
val: Reporter,
},
ClearSoundEffects,
ChangeVolumeBy {
inc: Reporter,
},
SetVolumeTo {
volume: Reporter,
},
Broadcast {
broadcast: Reporter,
},
BroadcastAndWait {
broadcast: Reporter,
},
WaitSecs {
secs: Reporter,
},
Repeat {
times: Reporter,
body: Vec<Action>,
},
Forever {
body: Vec<Action>,
},
If {
cond: Reporter,
then: Vec<Action>,
},
IfElse {
cond: Reporter,
then: Vec<Action>,
otherwise: Vec<Action>,
},
WaitUntil {
cond: Reporter,
},
RepeatUntil {
cond: Reporter,
body: Vec<Action>,
},
While {
cond: Reporter,
body: Vec<Action>,
},
Stop {
stop: StopField,
},
CreateCloneOf {
menu: Reporter,
},
DeleteThisClone,
AskAndWait {
content: Reporter,
},
SetDragMode {
draggable: bool,
},
ResetTimer,
SetVariableTo {
var: VarId,
val: Reporter,
},
ChangeVariableBy {
var: VarId,
inc: Reporter,
},
ShowVariable {
var: VarId,
},
HideVariable {
var: VarId,
},
AddToList {
list: ListId,
val: Reporter,
},
DeleteOfList {
list: ListId,
index: Reporter,
},
DeleteAllOfList {
list: ListId,
},
InsertAtOfList {
list: ListId,
val: Reporter,
index: Reporter,
},
ReplaceItemOfListWith {
list: ListId,
index: Reporter,
val: Reporter,
},
ShowList {
list: ListId,
},
HideList {
list: ListId,
},
CallProcedure {
proccode: String,
args: Vec<Reporter>,
},
Unknown(UnknownBlock),
}Expand description
The representation of a Scratch action block.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MoveSteps
TurnRight
TurnLeft
GoTo
GoToXY
GlideSecsTo
GlideSecsToXY
PointInDirection
PointTowards
ChangeXBy
SetXTo
ChangeYBy
SetYTo
IfOnEdgeBounce
SetRotationStyle
Fields
§
style: RotationStyleSayForSeconds
Say
ThinkForSeconds
Think
SwitchCostumeTo
NextCostume
SwitchBackdropTo
SwitchBackdropToAndWait
NextBackdrop
ChangeSizeBy
SetSizeTo
ChangeGraphicEffectBy
SetGraphicEffectTo
ClearGraphicEffects
Show
Hide
GoToLayer
Fields
§
front_back: FrontBackFieldGoLayers
PlaySoundUntilDone
PlaySound
StopAllSounds
ChangeSoundEffectBy
SetSoundEffectTo
ClearSoundEffects
ChangeVolumeBy
SetVolumeTo
Broadcast
BroadcastAndWait
WaitSecs
Repeat
Forever
If
IfElse
WaitUntil
RepeatUntil
While
Stop
CreateCloneOf
Fields
DeleteThisClone
AskAndWait
SetDragMode
ResetTimer
SetVariableTo
ChangeVariableBy
ShowVariable
HideVariable
AddToList
DeleteOfList
DeleteAllOfList
InsertAtOfList
ReplaceItemOfListWith
ShowList
HideList
CallProcedure
Unknown(UnknownBlock)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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 more