/// This method is used for maintaining the backwards compatibility.
/// Returns:
/// - controller ID as-is, if there is only one controller.
/// - DEFAULT_PRINCIPAL_MULTIPLE_CONTROLLERS, if there are multiple
///   controllers.
/// - DEFAULT_PRINCIPAL_ZERO_CONTROLLERS, if there is no controller.
This method is used for maintaining the backwards compatibility.
Returns:
controller ID as-is, if there is only one controller.
DEFAULT_PRINCIPAL_MULTIPLE_CONTROLLERS, if there are multiple
controllers.
DEFAULT_PRINCIPAL_ZERO_CONTROLLERS, if there is no controller.
This method is used for maintaining the backwards compatibility . Returns : controller ID as - is if there is only one controller . DEFAULT_PRINCIPAL_MULTIPLE_CONTROLLERS if there are multiple controllers . DEFAULT_PRINCIPAL_ZERO_CONTROLLERS if there is no controller .
pub fn controller(&self) -> &PrincipalId {
        if self.controllers.len() < 2 {
            match self.controllers.iter().next() {
                None => &DEFAULT_PRINCIPAL_ZERO_CONTROLLERS,
                Some(controller) => controller,
            }
        } else {
            &DEFAULT_PRINCIPAL_MULTIPLE_CONTROLLERS
        }
    }
pub fn controller ( & self ) -> & PrincipalId { if self . controllers . len ( ) < 2 { match self . controllers . iter ( ) . next ( ) { None => & DEFAULT_PRINCIPAL_ZERO_CONTROLLERS , Some ( controller ) => controller , } } else { & DEFAULT_PRINCIPAL_MULTIPLE_CONTROLLERS } }
This method is used for maintaining the backwards compatibility.
This method is used for maintaining the backwards compatibility .
&self