pub fn align(
        &mut self,
        pattern: &[u8],
        text: &[u8],
    ) -> Result<(), WavefrontError> {
        if pattern.len() > self.pattern_len || text.len() > self.text_len {
            return Err(WavefrontError::InputLengthError);
        }
        unsafe {
            affine_wavefronts_align(
                self.ptr,
                pattern.as_ptr() as *const c_char,
                pattern.len() as c_int,
                text.as_ptr() as *const c_char,
                text.len() as c_int,
            );
        }
        Ok(())
    }
/// Align the given pattern and text string. Callers need to make
/// sure the byteslices have the correct length compared to the
/// lengths used to construct thing wavefronts object.
///
/// Does *not* check that `pattern` and `text` are nul-terminated
/// CStrings, since the C function used takes the string lengths
/// as arguments.
Align the given pattern and text string. Callers need to make
sure the byteslices have the correct length compared to the
lengths used to construct thing wavefronts object.

Does *not* check that `pattern` and `text` are nul-terminated
CStrings, since the C function used takes the string lengths
as arguments.
Align the given pattern and text string . Callers need to make sure the byteslices have the correct length compared to the lengths used to construct thing wavefronts object . Does * not * check that ` pattern ` and ` text ` are nul - terminated CStrings since the C function used takes the string lengths as arguments .
pub fn align(
        &mut self,
        pattern: &[u8],
        text: &[u8],
    ) -> Result<(), WavefrontError> {
        if pattern.len() > self.pattern_len || text.len() > self.text_len {
            return Err(WavefrontError::InputLengthError);
        }
        unsafe {
            affine_wavefronts_align(
                self.ptr,
                pattern.as_ptr() as *const c_char,
                pattern.len() as c_int,
                text.as_ptr() as *const c_char,
                text.len() as c_int,
            );
        }
        Ok(())
    }
pub fn align ( & mut self , pattern : & [ u8 ] , text : & [ u8 ] , ) -> Result < ( ) , WavefrontError > { if pattern . len ( ) > self . pattern_len || text . len ( ) > self . text_len { return Err ( WavefrontError :: InputLengthError ) ; } unsafe { affine_wavefronts_align ( self . ptr , pattern . as_ptr ( ) as * const c_char , pattern . len ( ) as c_int , text . as_ptr ( ) as * const c_char , text . len ( ) as c_int , ) ; } Ok ( ( ) ) }
Align the given pattern and text string.
Align the given pattern and text string .
&mut self
pattern
&[u8]
text
&[u8]