Skip to main content

try_parse_into_uri

Function try_parse_into_uri 

Source
fn try_parse_into_uri(
    raw_uri: &RawUri,
    source: &ResolvedInputSource,
    root_dir: Option<&PathBuf>,
    base: Option<&Base>,
) -> LycheeResult<Uri>
Expand description

Try to parse the raw URI into a Uri.

If the raw URI is not a valid URI, create a URI by joining the base URL with the text. If the base URL is not available, create a URI from the file path.

ยงErrors

  • If the text (the unparsed URI represented as a String) cannot be joined with the base to create a valid URI.
  • If a URI cannot be created from the file path.
  • If the source is not a file path (i.e. the URI type is not supported).