pub struct IfStatement {
pub condition: Expression,
pub documentation: Option<String>,
pub false_body: Option<IfStatementFalseBody>,
pub id: i64,
pub node_type: IfStatementNodeType,
pub src: SourceLocation,
pub true_body: IfStatementTrueBody,
}
Expand description
IfStatement
JSON schema
{
"type": "object",
"required": [
"condition",
"id",
"nodeType",
"src",
"trueBody"
],
"properties": {
"condition": {
"$ref": "#/definitions/Expression"
},
"documentation": {
"type": "string"
},
"falseBody": {
"anyOf": [
{
"anyOf": [
{
"$ref": "#/definitions/Statement"
},
{
"$ref": "#/definitions/Block"
}
]
},
{
"type": "null"
}
]
},
"id": {
"type": "integer"
},
"nodeType": {
"enum": [
"IfStatement"
]
},
"src": {
"$ref": "#/definitions/SourceLocation"
},
"trueBody": {
"anyOf": [
{
"$ref": "#/definitions/Statement"
},
{
"$ref": "#/definitions/Block"
}
]
}
},
"additionalProperties": false
}
Fields§
§condition: Expression
§documentation: Option<String>
§false_body: Option<IfStatementFalseBody>
§id: i64
§node_type: IfStatementNodeType
§src: SourceLocation
§true_body: IfStatementTrueBody
Trait Implementations§
Source§impl Clone for IfStatement
impl Clone for IfStatement
Source§fn clone(&self) -> IfStatement
fn clone(&self) -> IfStatement
Returns a copy 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 Debug for IfStatement
impl Debug for IfStatement
Source§impl<'de> Deserialize<'de> for IfStatement
impl<'de> Deserialize<'de> for IfStatement
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 From<&IfStatement> for IfStatement
impl From<&IfStatement> for IfStatement
Source§fn from(value: &IfStatement) -> Self
fn from(value: &IfStatement) -> Self
Converts to this type from the input type.
Source§impl From<IfStatement> for Statement
impl From<IfStatement> for Statement
Source§fn from(value: IfStatement) -> Self
fn from(value: IfStatement) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for IfStatement
impl RefUnwindSafe for IfStatement
impl Send for IfStatement
impl Sync for IfStatement
impl Unpin for IfStatement
impl UnwindSafe for IfStatement
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