pub fn byte_offset_of_line_index_snapped(&self, line:Line) -> Bytes {
        use BoundsError::*;
        match self.byte_offset_of_line_index(line) {
            Ok(offset)             => offset,
            Err(TooSmall) => self.first_line_byte_offset(),
            Err(TooBig)   => self.last_line_byte_offset(),
        }
    }
/// The byte offset of the given line. Snapped to the closest valid byte offset in case the
/// line index was invalid.
The byte offset of the given line. Snapped to the closest valid byte offset in case the
line index was invalid.
The byte offset of the given line . Snapped to the closest valid byte offset in case the line index was invalid .
pub fn byte_offset_of_line_index_snapped(&self, line:Line) -> Bytes {
        use BoundsError::*;
        match self.byte_offset_of_line_index(line) {
            Ok(offset)             => offset,
            Err(TooSmall) => self.first_line_byte_offset(),
            Err(TooBig)   => self.last_line_byte_offset(),
        }
    }
pub fn byte_offset_of_line_index_snapped ( & self , line : Line ) -> Bytes { use BoundsError :: * ; match self . byte_offset_of_line_index ( line ) { Ok ( offset ) => offset , Err ( TooSmall ) => self . first_line_byte_offset ( ) , Err ( TooBig ) => self . last_line_byte_offset ( ) , } }
The byte offset of the given line.
The byte offset of the given line .
&self
line
Line
&self
line
Line