#[non_exhaustive]pub enum OrkError {
UnknownContainer {
head: String,
},
Zip {
reason: String,
},
Gzip {
reason: String,
},
NoDesign,
NotUtf8,
Xml {
reason: String,
},
NotOpenRocket {
root: String,
},
TooBig {
limit: u64,
},
TooDeep {
limit: usize,
depth: usize,
},
Version {
text: String,
},
}Expand description
A .ork file that could not be opened or whose design document could not be parsed.
A reader that can go on raises a Warning instead: only the faults listed
here stop the read, and each one leaves nothing useful behind.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownContainer
The bytes start with neither a zip signature, a gzip signature, nor XML.
Zip
The zip container could not be read.
Gzip
The gzip stream could not be decompressed.
NoDesign
The zip container holds no entry that could be the design document.
NotUtf8
The design document is not UTF-8. OpenRocket writes UTF-8 and declares it.
Xml
The design document is not well-formed XML.
NotOpenRocket
The document’s root element is not <openrocket>.
TooBig
The container decompresses to more than
MAX_UNPACKED_BYTES.
TooDeep
The document nests deeper than MAX_DEPTH.
Version
The root element carries no version attribute, or one that is not major.minor.
Trait Implementations§
impl Eq for OrkError
Source§impl Error for OrkError
impl Error for OrkError
1.30.0 · 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()
impl StructuralPartialEq for OrkError
Auto Trait Implementations§
impl Freeze for OrkError
impl RefUnwindSafe for OrkError
impl Send for OrkError
impl Sync for OrkError
impl Unpin for OrkError
impl UnsafeUnpin for OrkError
impl UnwindSafe for OrkError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.