Skip to main content

parse

Function parse 

Source
pub fn parse(s: &str) -> Option<Target>
Expand description

Parse a single target string.

Convenience wrapper around Target::from_str.

Example:

use scantarget::{parse, Target};

assert_eq!(parse("https://example.com"), "https://example.com".parse::<Target>().ok());
assert!(parse("http://").is_none());