pub fn validate_moniker_part(name: Option<&str>) -> Result<(), MonikerError> {
    // Reuse the validation in cm_types::Name for consistency.
    name.map(|n| Name::from_str(n).map_err(|_| MonikerError::invalid_moniker_part(n)))
        .transpose()?;
    Ok(())
}
/// Validates that the given string is valid as the instance or collection name in a moniker.
// TODO(fxbug.dev/77563): The moniker types should be updated to use Name directly instead of String
// so that it is clear what is validated and what isn't.
Validates that the given string is valid as the instance or collection name in a moniker.
TODO(fxbug.dev/77563): The moniker types should be updated to use Name directly instead of String
so that it is clear what is validated and what isn't.
Validates that the given string is valid as the instance or collection name in a moniker . TODO ( fxbug . dev / 77563 ) : The moniker types should be updated to use Name directly instead of String so that it is clear what is validated and what isn ' t .
pub fn validate_moniker_part(name: Option<&str>) -> Result<(), MonikerError> {
    // Reuse the validation in cm_types::Name for consistency.
    name.map(|n| Name::from_str(n).map_err(|_| MonikerError::invalid_moniker_part(n)))
        .transpose()?;
    Ok(())
}
pub fn validate_moniker_part ( name : Option < & str > ) -> Result < ( ) , MonikerError > { // Reuse the validation in cm_types::Name for consistency. name . map ( | n | Name :: from_str ( n ) . map_err ( | _ | MonikerError :: invalid_moniker_part ( n ) ) ) . transpose ( ) ? ; Ok ( ( ) ) }
Validates that the given string is valid as the instance or collection name in a moniker.
Validates that the given string is valid as the instance or collection name in a moniker .
name
Option<&str>
name
Option<&str>