Store nom parser as boxed closure

Suppose I'm going to parse an IP address in binary:

pub struct IPv4Addr<'a> {
    ip: &'a [u8],
    port: u16
}

Since I want to reuse the parser later, so I stored the parser in a boxed closure by implementing a trait:

pub type ParserType<I, O, E=(I, ErrorKind)> = Box<dyn Fn(I) -> IResult<I, O, E>>;

pub trait ParseFrom<I, E=(I, ErrorKind)> where Self: Sized {
    const PARSER: ParserType<I, Self, E>;
    fn parse(input: I) -> IResult<I, Self, E> {
        Self::PARSER(input)
    }
}

impl<'a> ParseFrom<&'a [u8]> for IPv4Addr<'a> {
    const PARSER: ParserType<&'a[u8], Self> = Box::new(
        map(
            pair(take(4u8), be_u16),
            |(ip, port)| IPv4Addr { ip, port }
        )
    );
}

then I got this error:

error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
  --> src/protocol/ipv4address.rs:27:13
   |
27 |             pair(take(4u8), be_u16),
   |             ^^^^^^^^^^^^^^^^^^^^^^^
   |
note: first, the lifetime cannot outlive the lifetime 'a as defined on the impl at 24:6...
  --> src/protocol/ipv4address.rs:24:6
   |
24 | impl<'a> ParseFrom<&'a [u8]> for IPv4Addr<'a> {
   |      ^^
   = note: ...so that the types are compatible:
           expected std::ops::Fn<(&'a [u8],)>
              found std::ops::Fn<(&[u8],)>
   = note: but, the lifetime must be valid for the static lifetime...
   = note: ...so that the expression is assignable:
           expected std::boxed::Box<(dyn std::ops::Fn(&'a [u8]) -> std::result::Result<(&'a [u8], protocol::ipv4address::IPv4Addr<'a>), nom::internal::Err<(&'a [u8], nom::error::ErrorKind)>> + 'static)>
           expected std::boxed::Box<(dyn std::ops::Fn(&'a [u8]) -> std::result::Result<(&'a [u8], protocol::ipv4address::IPv4Addr<'a>), nom::internal::Err<(&'a [u8], nom::error::ErrorKind)>> + 'static)>
              found std::boxed::Box<dyn std::ops::Fn(&'a [u8]) -> std::result::Result<(&[u8], protocol::ipv4address::IPv4Addr<'_>), nom::internal::Err<(&[u8], nom::error::ErrorKind)>>>

Could someone give me some pointers on this? I don't see how I messed up the lifetime.