1use std::error;
2use std::fmt;
3
4/// Returned when borrowing fails.
5#[derive(Debug)]
6pub struct InvalidThreadAccess;
7
8impl fmt::Display for InvalidThreadAccess {
9 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10 write!(f, "fragile value accessed from foreign thread")
11 }
12}
13
14impl error::Error for InvalidThreadAccess {}
15