moznion / radius-rs

An async/await native implementation of the RADIUS server and client for Rust.
MIT License
87 stars 14 forks source link

Why no "Packet::get_attributes"? #38

Open aiguy110 opened 1 year ago

aiguy110 commented 1 year ago

There doesn't seem to be a way to retrieve a list of all AVPs from a Packet currently, just get AVPs with a specific AVPType via Packet::lookup and Packet::lookup_all. Is this intentional?

I see Packet's private attributes field is of type core::attributes::Attributes, which has visibility pub(crate) instead of just pub... so it seems like this might be intentional. If it is, could you provide some of the reasoning as to why? A blanket Packet::get_attributes method would be quite helpful for my use-case.