ockam_command 0.104.0

End-to-end encryption and mutual authentication for distributed applications.
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::Result;
use miette::miette;

pub fn relay_name_parser(arg: &str) -> Result<String> {
    if arg.starts_with("forward_to_") {
        Ok(arg.to_string())
    } else {
        Err(miette!("The relay name must be prefixed with 'forward_to_'").into())
    }
}