pub fn validate_byte_offset(&self, offset:Bytes) -> Result<Bytes,BoundsError> {
        use BoundsError::*;
        if      offset < 0.bytes()        {Err(TooSmall)}
        else if offset > self.byte_size() {Err(TooBig)}
        else                              {Ok(offset)}
    }
/// Check whether the provided byte offset is valid in this text.
Check whether the provided byte offset is valid in this text.
Check whether the provided byte offset is valid in this text .
pub fn validate_byte_offset(&self, offset:Bytes) -> Result<Bytes,BoundsError> {
        use BoundsError::*;
        if      offset < 0.bytes()        {Err(TooSmall)}
        else if offset > self.byte_size() {Err(TooBig)}
        else                              {Ok(offset)}
    }
pub fn validate_byte_offset ( & self , offset : Bytes ) -> Result < Bytes , BoundsError > { use BoundsError :: * ; if offset < 0 . bytes ( ) { Err ( TooSmall ) } else if offset > self . byte_size ( ) { Err ( TooBig ) } else { Ok ( offset ) } }
Check whether the provided byte offset is valid in this text.
Check whether the provided byte offset is valid in this text .
&self
offset
Bytes
&self
offset
Bytes