LCOV - code coverage report

Current view
top level - src/annotations - squadron_method.dart
Test
lcov.info
Date
2025-03-26
Legend
Lines
hit
not hit
Branches
taken
not taken
# not executed
HitTotalCoverage
Lines11100.0%
Functions00-
Branches00-
Each row represents a line of source code
LineBranchHitsSource code
1import '../channel.dart';
2
3/// Annotation for service methods to be exposed by workers.
4class SquadronMethod {
512 const SquadronMethod({
6 this.inspectRequest = false,
7 this.inspectResponse = false,
8 this.withContext,
9 });
10
11 /// Indicates whether the contents of the incoming message should be
12 /// inspected by Squadron before sending the request to the worker. By
13 /// default, incoming messages are not inspected except for the startup
14 /// message. The purpose of message inspection is to detect non-base-type
15 /// data that require transfer of ownership to the target worker. E.g. if
16 /// the request data include a [Channel] object, [inspectRequest] must be
17 /// set to `true`.
18 final bool inspectRequest;
19
20 /// Same as [inspectRequest] but for outgoing messages (response produced
21 /// by the worker).
22 final bool inspectResponse;
23
24 /// Indicates whether de/serialization should use a serialization context.
25 /// Serialization contexts enable transfering data and preserve identities,
26 /// e.g. calling `myService.myMethod(x, x)` will result in the service method
27 /// receiving the same serialization data for `x`. If `null`, a serialization
28 /// context will be automatically used if and only if marshaling is required
29 /// to call the service method.
30 final bool? withContext;
31}
32
33const squadronMethod = SquadronMethod();
Choose Features