(name: &str)
| 718 | } |
| 719 | |
| 720 | fn validate_extension_name(name: &str) -> LifecycleResult<()> { |
| 721 | if name.is_empty() || name == "." || name == ".." { |
| 722 | return Err(LifecycleError::new( |
| 723 | "lifecycle extension name is empty or reserved", |
| 724 | )); |
| 725 | } |
| 726 | if !name |
| 727 | .chars() |
| 728 | .all(|ch| ch.is_ascii_alphanumeric() || ch == '-' || ch == '_' || ch == '.') |
| 729 | { |
| 730 | return Err(LifecycleError::new(format!( |
| 731 | "lifecycle extension name '{name}' must contain only ASCII letters, numbers, '.', '-', or '_'" |
| 732 | ))); |
| 733 | } |
| 734 | Ok(()) |
| 735 | } |
| 736 | |
| 737 | fn validate_descriptor_strings(descriptor: &ExtensionDescriptor) -> LifecycleResult<()> { |
| 738 | for value in descriptor |
no test coverage detected