# File lib/core/link.rb, line 214
    def self.wrap(impl)
      return nil if impl.nil?

      result = self.fetch_instance(impl, :pn_link_attachments)
      return result unless result.nil?
      if Cproton.pn_link_is_sender(impl)
        return Sender.new(impl)
      elsif Cproton.pn_link_is_receiver(impl)
        return Receiver.new(impl)
      end
    end