Skip to content

Commit

Permalink
Add traits for operations that change the load order
Browse files Browse the repository at this point in the history
  • Loading branch information
Ortham committed Aug 14, 2017
1 parent 0b946ff commit 6cf1bf6
Show file tree
Hide file tree
Showing 3 changed files with 405 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/load_order/error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* This file is part of libloadorder
*
* Copyright (C) 2017 Oliver Hamlet
*
* libespm is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* libespm is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with libespm. If not, see <http://www.gnu.org/licenses/>.
*/

use error::Error;

#[derive(Debug)]
pub enum LoadOrderError {
PluginError(Error),
PluginNotFound,
TooManyActivePlugins,
InvalidPlugin(String),
ImplicitlyActivePlugin(String),
}

impl From<Error> for LoadOrderError {
fn from(error: Error) -> Self {
LoadOrderError::PluginError(error)
}
}
2 changes: 2 additions & 0 deletions src/load_order/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
* along with libespm. If not, see <http://www.gnu.org/licenses/>.
*/

mod error;
mod readable;
mod writable;
mod tests;

use unicase::eq;
Expand Down

0 comments on commit 6cf1bf6

Please sign in to comment.