pub trait FromLineOffset: Sized {
type Offset: TryFrom<u64> + Into<u64>;
// Required methods
fn offset(&self) -> Self::Offset;
fn from_line_offset(line: &str, offset: Self::Offset) -> Result<Self>;
}
Expand description
A trait for items that can be created from a line and an offset.
Required Associated Types§
Required Methods§
Sourcefn from_line_offset(line: &str, offset: Self::Offset) -> Result<Self>
fn from_line_offset(line: &str, offset: Self::Offset) -> Result<Self>
Creates an item from a line and an offset.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.