INNER CODE UNIT · Rust

get_include

attackgoat/vk-graph · crates/vk-graph-hot/src/lib.rs:64

        fn get_include(
            &mut self,
            path: &ResolvedIncludePath,
        ) -> Result<String, BoxedIncludeProviderError> {
            self.0.insert(PathBuf::from(&path.0));

            Ok(read_to_string(&path.0)?)
        }

        fn resolve_path(
            &self,
            path: &str,
            context: &Self::IncludeContext,
        ) -> Result<ResolvedInclude<Self::IncludeContext>, BoxedIncludeProviderError> {
            let path = context.join(path);

            Ok(ResolvedInclude {
                resolved_path: ResolvedIncludePath(path.to_str().unwrap_or_default().to_string()),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…