1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 01:37:34 +00:00

Kernel: Add NetworkingManagement::try_for_each() for fallible iteration

This API will allow users to short circuit iteration and properly
propagate errors.
This commit is contained in:
Idan Horowitz 2022-02-24 20:04:32 +02:00 committed by Andreas Kling
parent da5d678f2a
commit 74ab8ccde0
2 changed files with 10 additions and 0 deletions

View file

@ -31,6 +31,7 @@ public:
NetworkingManagement();
void for_each(Function<void(NetworkAdapter&)>);
ErrorOr<void> try_for_each(Function<ErrorOr<void>(NetworkAdapter&)>);
RefPtr<NetworkAdapter> from_ipv4_address(const IPv4Address&) const;
RefPtr<NetworkAdapter> lookup_by_name(StringView) const;