Compact struct return values

This commit is contained in:
Nadja von Reitzenstein Čerpnjak 2024-04-22 11:00:27 +02:00
parent 8f9770ac22
commit 637e56c4ad
3 changed files with 7 additions and 7 deletions

View File

@ -31,7 +31,7 @@ interface Interest extends (Owned) {
struct InterestKind { struct InterestKind {
union { union {
Queue @0 :UInt64; queue @0 :UInt64;
Reservation @1 :When; reservation @1 :When;
} }
} }

View File

@ -10,17 +10,17 @@ using import "state.capnp".Update;
using import "measure.capnp".Measurement; using import "measure.capnp".Measurement;
interface Notifiable { interface Notifiable {
state @0 () -> ( state :Map(OID, AnyPointer) ); state @0 () -> Map(OID, AnyPointer);
# Returns the current state of a resource. # Returns the current state of a resource.
getStateOid @4 ( oid :OID ) -> AnyPointer; getStateOid @4 ( oid :OID ) -> ( state :AnyPointer );
# Return only the state of the trait with the given OID # Return only the state of the trait with the given OID
subscribe @1 ( subscriber :Subscriber(Update) ) -> ( subscription :Subscription ); subscribe @1 ( subscriber :Subscriber(Update) ) -> ( subscription :Subscription );
# Subscribe to state updates. The passed in `subscriber` is an interface implemented on the # Subscribe to state updates. The passed in `subscriber` is an interface implemented on the
# client side that a server calls to send update notifications. # client side that a server calls to send update notifications.
measurements @2 () -> ( measurements :Map(OID, AnyPointer) ); measurements @2 () -> Map(OID, AnyPointer);
subscribeMeasurements @3 ( subscriber :Subscriber(Measurement) ) -> ( subscription: Subscription ); subscribeMeasurements @3 ( subscriber :Subscriber(Measurement) ) -> ( subscription: Subscription );
} }

View File

@ -56,9 +56,9 @@ struct InterestView {
struct LockView { struct LockView {
isLocked @0 :Bool; isLocked @0 :Bool;
lock @0 :Lock; lock @1 :Lock;
# NULL if caller lacks impersonate permission. # NULL if caller lacks impersonate permission.
lockReason @1 :L10NString; lockReason @2 :L10NString;
# Only set if resource is locked *and* a lock reason was set. # Only set if resource is locked *and* a lock reason was set.
} }