Skip to main content

get_segment

Function get_segment 

Source
pub fn get_segment(path: &str, index: usize) -> Option<String>
Expand description

Returns one slash-separated segment by index.

§Parameters

§Returns

Returns Some when crate::runtime::json_commands::get_segment can produce a value and None otherwise.

§Performance

Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::runtime::json_commands::get_segment.

§Examples

ⓘ
let _result = pharos_native::runtime::json_commands::get_segment(std::path::Path::new("fixture.json"), todo!());