#[non_exhaustive]pub enum Error {
Show 13 variants
UnknownNode {
link: usize,
node: String,
},
SelfLink {
link: usize,
node: String,
},
PortInUse {
node: String,
port: String,
},
TooManyLinks(usize),
UnknownLan {
node: String,
lan: String,
},
ReservedLanName(String),
BadCidr {
lan: String,
cidr: String,
},
AddressTaken {
lan: String,
octet: u8,
first: String,
second: String,
},
LanFull {
lan: String,
cidr: String,
},
SwitchNameTaken {
switch: String,
},
PortName {
node: String,
port: u16,
source: Error,
},
Yaml(Error),
Unreadable(Problems),
}Expand description
Why a drawing doesn’t compile.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownNode
A cable names a node the lab doesn’t have.
SelfLink
A cable runs from a node to itself.
PortInUse
Two cables share a port.
TooManyLinks(usize)
More cables than the cables’ block holds.
UnknownLan
A node is on a LAN the lab doesn’t have.
ReservedLanName(String)
A LAN’s name is one the cables use (link-<n>).
BadCidr
A LAN’s CIDR isn’t a.b.c.d/n.
AddressTaken
Two nodes ask for the same address on a LAN.
Fields
LanFull
A LAN has more machines than free addresses.
SwitchNameTaken
A switch has the name of a LAN: its VLANs nest under a LAN of that name in the spec.
PortName
A port name the compiler made breaks Isoloom’s rule (a bug: the names are generated).
Yaml(Error)
The spec couldn’t be written as YAML.
Unreadable(Problems)
Isoloom doesn’t read the spec the compiler wrote (a bug: the compiler writes only what Isoloom’s format holds).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
Mutably borrows from an owned value. Read more