Skip to main content

refresh

Function refresh 

Source
pub fn refresh(
    model: &mut CimDataset,
    before: &[File<'_>],
    files: &[File<'_>],
) -> Result<usize, String>
Expand description

model, decoded from the files as they were, brought up to date with files as they are now (in the order the model was decoded from them); before holds each file that changed as it was, with its index. The number of objects decoded again.

An error says why the model can’t be patched: a file gone or new, an edit of what is written around the objects (the XML declaration, the root element), an object without an mRID, objects of classes no table knows, or a difference model. The model may then be partly changed: decode it anew. A model with difference models applied (CimDataset::apply) is the caller’s to decode anew.