/// Returns the slice of input up to (but not including) the first LF
/// character, if that slice is entirely Base64 characters
///
/// # Errors
///
/// - Returns Failure on an empty slice.
/// - Returns Incomplete(1) if a LF is not found.
Returns the slice of input up to (but not including) the first LF
character, if that slice is entirely Base64 characters
Returns the slice of input up to ( but not including ) the first LF character if that slice is entirely Base64 characters
fn take_b64_line(input: &[u8]) -> IResult<&[u8], &[u8]> {
        verify(take_while1(|c| c != b'\n'), |bytes: &[u8]| {
            // STANDARD_NO_PAD only differs from STANDARD during serialization; the base64
            // crate always allows padding during parsing. We require canonical
            // serialization, so we explicitly reject padding characters here.
            base64::decode_config(bytes, base64::STANDARD_NO_PAD).is_ok() && !bytes.contains(&b'=')
        })(input)
    }
fn take_b64_line ( input : & [ u8 ] ) -> IResult < & [ u8 ] , & [ u8 ] > { verify ( take_while1 ( | c | c != b'\n' ) , | bytes : & [ u8 ] | { // STANDARD_NO_PAD only differs from STANDARD during serialization; the base64 // crate always allows padding during parsing. We require canonical // serialization, so we explicitly reject padding characters here. base64 :: decode_config ( bytes , base64 :: STANDARD_NO_PAD ) . is_ok ( ) && ! bytes . contains ( & b'=' ) } ) ( input ) }
Returns the slice of input up to (but not including) the first LF
character, if that slice is entirely Base64 characters
Returns the slice of input up to ( but not including ) the first LF character if that slice is entirely Base64 characters
input
&[u8]
errors
Returns Failure on an empty slice.
Returns Incomplete(1) if a LF is not found.
Returns Failure on an empty slice . Returns Incomplete ( 1 ) if a LF is not found .