fn pre_validate_vertex(
        &mut self,
        v: Vertex<C>,
    ) -> Result<PreValidatedVertex<C>, (Vertex<C>, VertexError)> {
        let id = v.id();
        if let Some(prev_pvv) = self.pvv_cache.get(&id) {
            return Ok(prev_pvv.clone());
        }
        let pvv = self.highway.pre_validate_vertex(v)?;
        self.pvv_cache.insert(id, pvv.clone());
        Ok(pvv)
    }
/// Prevalidates the vertex but checks the cache for previously validated vertices.
/// Avoids multiple validation of the same vertex.
Prevalidates the vertex but checks the cache for previously validated vertices.
Avoids multiple validation of the same vertex.
Prevalidates the vertex but checks the cache for previously validated vertices . Avoids multiple validation of the same vertex .
fn pre_validate_vertex(
        &mut self,
        v: Vertex<C>,
    ) -> Result<PreValidatedVertex<C>, (Vertex<C>, VertexError)> {
        let id = v.id();
        if let Some(prev_pvv) = self.pvv_cache.get(&id) {
            return Ok(prev_pvv.clone());
        }
        let pvv = self.highway.pre_validate_vertex(v)?;
        self.pvv_cache.insert(id, pvv.clone());
        Ok(pvv)
    }
fn pre_validate_vertex ( & mut self , v : Vertex < C > , ) -> Result < PreValidatedVertex < C > , ( Vertex < C > , VertexError ) > { let id = v . id ( ) ; if let Some ( prev_pvv ) = self . pvv_cache . get ( & id ) { return Ok ( prev_pvv . clone ( ) ) ; } let pvv = self . highway . pre_validate_vertex ( v ) ? ; self . pvv_cache . insert ( id , pvv . clone ( ) ) ; Ok ( pvv ) }
Prevalidates the vertex but checks the cache for previously validated vertices.
Prevalidates the vertex but checks the cache for previously validated vertices .
&mut self
v
Vertex<C>
&mut self
v
Vertex<C>