pub fn snap_bytes_location_error(&self, err:LocationError<Bytes>) -> Bytes {
        use self::BoundsError::*;
        use LocationError::*;
        match err {
            BoundsError        (TooSmall) => 0.bytes(),
            BoundsError        (TooBig)   => self.last_line_end_byte_offset(),
            LineTooShort       (offset)   => offset,
            NotClusterBoundary (offset)   => offset,
        }
    }
/// Snaps the `LocationError<Bytes>` to the closest valid byte offset.
Snaps the `LocationError` to the closest valid byte offset.
Snaps the ` LocationError ` to the closest valid byte offset .
pub fn snap_bytes_location_error(&self, err:LocationError<Bytes>) -> Bytes {
        use self::BoundsError::*;
        use LocationError::*;
        match err {
            BoundsError        (TooSmall) => 0.bytes(),
            BoundsError        (TooBig)   => self.last_line_end_byte_offset(),
            LineTooShort       (offset)   => offset,
            NotClusterBoundary (offset)   => offset,
        }
    }
pub fn snap_bytes_location_error ( & self , err : LocationError < Bytes > ) -> Bytes { use self :: BoundsError :: * ; use LocationError :: * ; match err { BoundsError ( TooSmall ) => 0 . bytes ( ) , BoundsError ( TooBig ) => self . last_line_end_byte_offset ( ) , LineTooShort ( offset ) => offset , NotClusterBoundary ( offset ) => offset , } }
Snaps the `LocationError<Bytes>` to the closest valid byte offset.
Snaps the ` LocationError<Bytes > ` to the closest valid byte offset .
&self
err
LocationError<Bytes>
&self
err
LocationError<Bytes>