code: private function applyFieldRule(FieldRule $rule = null)
      {
          $this->rule = $rule ?: FieldRule::A_SINGLE_VALUE();
          if ($this->isASet()) {
              Assertion::true(
                  $this->type->allowedInSet(),
                  sprintf(
                      'Field [%s] with type [%s] cannot be used in a set.',
                      $this->name,
                      $this->type->getTypeValue()
                  )
              );
          }
      }
docs: @param FieldRule $rule
  
  @throws AssertionFailed