edge-data structure

How to implement an edge-data structure please?

Many thanks