pub fn conditions(statement: &Statement) -> (Option<Conditions>, Option<Prefixes>) {
    if let Some(cond) = statement.cond_type {
        if let Some(pref) = statement.prefix {
            // Prefix and condition
            (
                Some(Conditions {
                    cond_type: cond,
                    sign: statement.cond_sign.unwrap(),
                    targets: statement.cond_targets.to_owned()
                }),
                Some(Prefixes {
                    prefix: pref,
                    sign: statement.prefix_sign.unwrap()
                })
            )
        }
        else {
            // Only condition
            (
                Some(Conditions {
                    cond_type: cond,
                    sign: statement.cond_sign.unwrap(),
                    targets: statement.cond_targets.to_owned()
                }),
                None
            )
        }
    }
    else if let Some(pref) = statement.prefix {
        // Only prefix
        (
            None,
            Some(Prefixes {
                prefix: pref,
                sign: statement.prefix_sign.unwrap()
            })
        )
    }
    else {
        // No conditions
        (None, None)
    }
}
/// Retrieves the conditions associated with a statement.
/// 
/// Returns a 2-tuple containing the Complex condition and the Prefix condition.
/// These will be None if the associated condition does not exist.
/// 
/// # Examples
/// 
/// * `BABA IS YOU` -> (None, None)
/// 
/// * `LONELY BABA IS YOU` -> (None, Some(<Lonely>))
/// 
/// * `BABA ON KEKE IS YOU` -> (Some(<On Keke>), None)
/// 
/// * `LONELY BABA NEAR KEKE IS YOU` -> (Some(<Near Keke>), Some(<Lonely>))
/// 
Retrieves the conditions associated with a statement.
Returns a 2-tuple containing the Complex condition and the Prefix condition.
These will be None if the associated condition does not exist.
Retrieves the conditions associated with a statement . Returns a 2 - tuple containing the Complex condition and the Prefix condition . These will be None if the associated condition does not exist .
pub fn conditions(statement: &Statement) -> (Option<Conditions>, Option<Prefixes>) {
    if let Some(cond) = statement.cond_type {
        if let Some(pref) = statement.prefix {
            // Prefix and condition
            (
                Some(Conditions {
                    cond_type: cond,
                    sign: statement.cond_sign.unwrap(),
                    targets: statement.cond_targets.to_owned()
                }),
                Some(Prefixes {
                    prefix: pref,
                    sign: statement.prefix_sign.unwrap()
                })
            )
        }
        else {
            // Only condition
            (
                Some(Conditions {
                    cond_type: cond,
                    sign: statement.cond_sign.unwrap(),
                    targets: statement.cond_targets.to_owned()
                }),
                None
            )
        }
    }
    else if let Some(pref) = statement.prefix {
        // Only prefix
        (
            None,
            Some(Prefixes {
                prefix: pref,
                sign: statement.prefix_sign.unwrap()
            })
        )
    }
    else {
        // No conditions
        (None, None)
    }
}
pub fn conditions ( statement : & Statement ) -> ( Option < Conditions > , Option < Prefixes > ) { if let Some ( cond ) = statement . cond_type { if let Some ( pref ) = statement . prefix { // Prefix and condition ( Some ( Conditions { cond_type : cond , sign : statement . cond_sign . unwrap ( ) , targets : statement . cond_targets . to_owned ( ) } ) , Some ( Prefixes { prefix : pref , sign : statement . prefix_sign . unwrap ( ) } ) ) } else { // Only condition ( Some ( Conditions { cond_type : cond , sign : statement . cond_sign . unwrap ( ) , targets : statement . cond_targets . to_owned ( ) } ) , None ) } } else if let Some ( pref ) = statement . prefix { // Only prefix ( None , Some ( Prefixes { prefix : pref , sign : statement . prefix_sign . unwrap ( ) } ) ) } else { // No conditions ( None , None ) } }
Retrieves the conditions associated with a statement.
Retrieves the conditions associated with a statement .
statement
&Statement
statement
&Statement
examples
`BABA IS YOU` -> (None, None)

`LONELY BABA IS YOU` -> (None, Some())

`BABA ON KEKE IS YOU` -> (Some(), None)

`LONELY BABA NEAR KEKE IS YOU` -> (Some(), Some())
` BABA IS YOU ` - > ( None None ) ` LONELY BABA IS YOU ` - > ( None Some () ) ` BABA ON KEKE IS YOU ` - > ( Some () None ) ` LONELY BABA NEAR KEKE IS YOU ` - > ( Some () Some () )