viewPeer<T> method

  1. @override
Future<T> viewPeer<T>(
  1. PeerId peer,
  2. Future<T> f(
    1. PeerScope scope
    )
)
override

ViewPeer views the resource management scope for a specific peer.

Implementation

@override
Future<T> viewPeer<T>(PeerId peer, Future<T> Function(PeerScope scope) f) async {
  // Assuming PeerId can be used where PeerId is expected
  final scope = getPeerScopeInternal(peer);
  // The cast is now valid as getPeerScopeInternal returns PeerScopeImpl
  return await f(scope);
}