pub enum InterchangeError {
Show 18 variants
Metadata {
position: usize,
source: Error,
},
Xml {
source: Error,
},
NotMspdi {
found: String,
},
MalformedProject {
reason: String,
},
MalformedTask {
position: usize,
reason: String,
},
OutlineOrder {
uid: i64,
source: OrderError,
},
DuplicateUid {
uid: i64,
},
DuplicateIdentity {
first: i64,
second: i64,
identity: String,
},
SourceScopeRequired {
count: usize,
first_uid: i64,
},
AmbiguousMatch {
ambiguities: Vec<String>,
},
UnknownProject {
key: String,
},
KeyCollision {
key: String,
uid: i64,
},
KindChange {
uid: i64,
guid: Option<String>,
key: String,
from: WorkKind,
to: WorkKind,
},
Refused {
change: SourceChange,
source: Box<dyn Error + Send + Sync + 'static>,
},
RefusedLink {
change: Box<SourceLinkChange>,
source: Box<dyn Error + Send + Sync + 'static>,
},
InvalidTimeZone {
time_zone: String,
},
TimeZoneMismatch {
workspace: String,
requested: String,
},
Unrepresentable {
key: String,
reason: String,
},
}Expand description
Interchange failure; every variant leaves the workspace untouched because imports only build a candidate for review.
Variants§
Metadata
A namespaced DPM metadata value is malformed.
Xml
The document is not well-formed XML.
NotMspdi
The root element is not a Microsoft Project XML project.
MalformedProject
A project-level element violates the MSPDI structure DPM relies on.
MalformedTask
A task or link element violates the MSPDI structure DPM relies on.
Fields
OutlineOrder
The imported outline cannot be assigned a valid sibling position.
DuplicateUid
Two task elements share a unique identifier.
DuplicateIdentity
Two task elements resolve to the same local work identity.
SourceScopeRequired
Neither the document nor some of its tasks carry a GUID, and the import names no source.
Fields
AmbiguousMatch
Matching GUID-less tasks to existing work by title path is not unique.
UnknownProject
The requested project key does not exist in the workspace.
KeyCollision
A generated key is already used by other work.
KindChange
A source task would change the kind of existing work, which reviewed plan changes forbid.
Fields
Refused
Review refused the candidate at work that a source task maps to.
Fields
change: SourceChangeSource task and the changes it attempts.
RefusedLink
Review refused the candidate at a dependency that a source link maps to, or that the candidate removes because the document omits the link.
Fields
change: Box<SourceLinkChange>Source link and the change it attempts.
InvalidTimeZone
The time zone given for the document’s calendars is not an IANA time zone name.
TimeZoneMismatch
The workspace already reads its calendars in another time zone.
Fields
Unrepresentable
A value cannot be written as MSPDI.
Implementations§
Trait Implementations§
Source§impl Debug for InterchangeError
impl Debug for InterchangeError
Source§impl Display for InterchangeError
impl Display for InterchangeError
Source§impl Error for InterchangeError
impl Error for InterchangeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()