pub fn location_of_byte_offset_snapped(&self, offset:Bytes) -> Location {
        use BoundsError::*;
        match self.location_of_byte_offset(offset) {
            Ok(location)        => location,
            Err(TooSmall) => self.first_line_start_location(),
            Err(TooBig)   => self.last_line_end_location(),
        }
    }
/// The location of the provided byte offset. Snapped to the closest valid
/// value.
The location of the provided byte offset. Snapped to the closest valid
value.
The location of the provided byte offset . Snapped to the closest valid value .
pub fn location_of_byte_offset_snapped(&self, offset:Bytes) -> Location {
        use BoundsError::*;
        match self.location_of_byte_offset(offset) {
            Ok(location)        => location,
            Err(TooSmall) => self.first_line_start_location(),
            Err(TooBig)   => self.last_line_end_location(),
        }
    }
pub fn location_of_byte_offset_snapped ( & self , offset : Bytes ) -> Location { use BoundsError :: * ; match self . location_of_byte_offset ( offset ) { Ok ( location ) => location , Err ( TooSmall ) => self . first_line_start_location ( ) , Err ( TooBig ) => self . last_line_end_location ( ) , } }
The location of the provided byte offset.
The location of the provided byte offset .
&self
offset
Bytes
&self
offset
Bytes