(&mut self)
| 4545 | } |
| 4546 | |
| 4547 | fn parse_cluster_option_name(&mut self) -> Result<ClusterOptionName, ParserError> { |
| 4548 | let option = self.expect_one_of_keywords(&[ |
| 4549 | AVAILABILITY, |
| 4550 | DISK, |
| 4551 | INTROSPECTION, |
| 4552 | MANAGED, |
| 4553 | REPLICAS, |
| 4554 | REPLICATION, |
| 4555 | SIZE, |
| 4556 | SCHEDULE, |
| 4557 | WORKLOAD, |
| 4558 | ])?; |
| 4559 | let name = match option { |
| 4560 | AVAILABILITY => { |
| 4561 | self.expect_keyword(ZONES)?; |
| 4562 | ClusterOptionName::AvailabilityZones |
| 4563 | } |
| 4564 | DISK => ClusterOptionName::Disk, |
| 4565 | INTROSPECTION => match self.expect_one_of_keywords(&[DEBUGGING, INTERVAL])? { |
| 4566 | DEBUGGING => ClusterOptionName::IntrospectionDebugging, |
| 4567 | INTERVAL => ClusterOptionName::IntrospectionInterval, |
| 4568 | _ => unreachable!(), |
| 4569 | }, |
| 4570 | MANAGED => ClusterOptionName::Managed, |
| 4571 | REPLICAS => ClusterOptionName::Replicas, |
| 4572 | REPLICATION => { |
| 4573 | self.expect_keyword(FACTOR)?; |
| 4574 | ClusterOptionName::ReplicationFactor |
| 4575 | } |
| 4576 | SIZE => ClusterOptionName::Size, |
| 4577 | SCHEDULE => ClusterOptionName::Schedule, |
| 4578 | WORKLOAD => { |
| 4579 | self.expect_keyword(CLASS)?; |
| 4580 | ClusterOptionName::WorkloadClass |
| 4581 | } |
| 4582 | _ => unreachable!(), |
| 4583 | }; |
| 4584 | Ok(name) |
| 4585 | } |
| 4586 | |
| 4587 | fn parse_cluster_option(&mut self) -> Result<ClusterOption<Raw>, ParserError> { |
| 4588 | let name = self.parse_cluster_option_name()?; |
no test coverage detected