[−][src]Enum pdbtbx::Context
A struct to define the context of an error message
Variants
When no context can be given
When only a line (eg filename) can be shown
Fields of Show
line: String
The line to be shown to the user (eg filename)
When a full line is faulty and no special position can be annotated
Fields of FullLine
When a special position can be annotated on a line.
|
104 | ATOM O N MET A 1 27.251 24.447 2.594 1.00 11.79 N
| ^^^^
<- -><-->
The first space (annotated by <-
, ->
) is the offset, in this case 7. The
second space is the length, in this case 4.
Fields of Line
Implementations
impl Context
[src]
pub fn none() -> Context
[src]
Creates a new context when no context can be given
pub fn show(line: &str) -> Context
[src]
Creates a new context when only a line (eg filename) can be shown
pub fn full_line(linenumber: usize, line: &str) -> Context
[src]
Creates a new context when a full line is faulty and no special position can be annotated
pub fn line(
linenumber: usize,
line: &str,
offset: usize,
length: usize
) -> Context
[src]
linenumber: usize,
line: &str,
offset: usize,
length: usize
) -> Context
Creates a new context when a special position can be annotated on a line
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Context
[src]
impl Send for Context
[src]
impl Sync for Context
[src]
impl Unpin for Context
[src]
impl UnwindSafe for Context
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,