@@ -72,9 +72,6 @@ use parse::ParseError;
72
72
use parse:: Token ;
73
73
use parse:: parse;
74
74
75
- use crate :: proc:: SEQ_INFO ;
76
- use crate :: proc:: SeqInfo ;
77
-
78
75
/// A universal reference to hierarchical identifiers in Hyperactor.
79
76
///
80
77
/// References implement a concrete syntax which can be parsed via
@@ -723,7 +720,7 @@ impl<A: RemoteActor> ActorRef<A> {
723
720
/// Send an [`M`]-typed message to the referenced actor.
724
721
pub fn send < M : RemoteMessage > (
725
722
& self ,
726
- cx : & impl context:: Mailbox ,
723
+ cx : & impl context:: Actor ,
727
724
message : M ,
728
725
) -> Result < ( ) , MailboxSenderError >
729
726
where
@@ -736,7 +733,7 @@ impl<A: RemoteActor> ActorRef<A> {
736
733
/// headers.
737
734
pub fn send_with_headers < M : RemoteMessage > (
738
735
& self ,
739
- cx : & impl context:: Mailbox ,
736
+ cx : & impl context:: Actor ,
740
737
headers : Attrs ,
741
738
message : M ,
742
739
) -> Result < ( ) , MailboxSenderError >
@@ -883,7 +880,7 @@ impl PortId {
883
880
/// Send a serialized message to this port, provided a sending capability,
884
881
/// such as [`crate::actor::Instance`]. It is the sender's responsibility
885
882
/// to ensure that the provided message is well-typed.
886
- pub fn send ( & self , cx : & impl context:: Mailbox , serialized : Serialized ) {
883
+ pub fn send ( & self , cx : & impl context:: Actor , serialized : Serialized ) {
887
884
let mut headers = Attrs :: new ( ) ;
888
885
crate :: mailbox:: headers:: set_send_timestamp ( & mut headers) ;
889
886
cx. post ( self . clone ( ) , headers, serialized) ;
@@ -894,7 +891,7 @@ impl PortId {
894
891
/// It is the sender's responsibility to ensure that the provided message is well-typed.
895
892
pub fn send_with_headers (
896
893
& self ,
897
- cx : & impl context:: Mailbox ,
894
+ cx : & impl context:: Actor ,
898
895
serialized : Serialized ,
899
896
mut headers : Attrs ,
900
897
) {
@@ -1014,7 +1011,7 @@ impl<M: RemoteMessage> PortRef<M> {
1014
1011
1015
1012
/// Send a message to this port, provided a sending capability, such as
1016
1013
/// [`crate::actor::Instance`].
1017
- pub fn send ( & self , cx : & impl context:: Mailbox , message : M ) -> Result < ( ) , MailboxSenderError > {
1014
+ pub fn send ( & self , cx : & impl context:: Actor , message : M ) -> Result < ( ) , MailboxSenderError > {
1018
1015
self . send_with_headers ( cx, Attrs :: new ( ) , message)
1019
1016
}
1020
1017
@@ -1023,7 +1020,7 @@ impl<M: RemoteMessage> PortRef<M> {
1023
1020
/// headers.
1024
1021
pub fn send_with_headers (
1025
1022
& self ,
1026
- cx : & impl context:: Mailbox ,
1023
+ cx : & impl context:: Actor ,
1027
1024
headers : Attrs ,
1028
1025
message : M ,
1029
1026
) -> Result < ( ) , MailboxSenderError > {
@@ -1041,7 +1038,7 @@ impl<M: RemoteMessage> PortRef<M> {
1041
1038
/// [`crate::actor::Instance`].
1042
1039
pub fn send_serialized (
1043
1040
& self ,
1044
- cx : & impl context:: Mailbox ,
1041
+ cx : & impl context:: Actor ,
1045
1042
mut headers : Attrs ,
1046
1043
message : Serialized ,
1047
1044
) {
@@ -1050,7 +1047,7 @@ impl<M: RemoteMessage> PortRef<M> {
1050
1047
}
1051
1048
1052
1049
/// Convert this port into a sink that can be used to send messages using the given capability.
1053
- pub fn into_sink < C : context:: Mailbox > ( self , cx : C ) -> PortSink < C , M > {
1050
+ pub fn into_sink < C : context:: Actor > ( self , cx : C ) -> PortSink < C , M > {
1054
1051
PortSink :: new ( cx, self )
1055
1052
}
1056
1053
}
@@ -1138,15 +1135,15 @@ impl<M: RemoteMessage> OncePortRef<M> {
1138
1135
1139
1136
/// Send a message to this port, provided a sending capability, such as
1140
1137
/// [`crate::actor::Instance`].
1141
- pub fn send ( self , cx : & impl context:: Mailbox , message : M ) -> Result < ( ) , MailboxSenderError > {
1138
+ pub fn send ( self , cx : & impl context:: Actor , message : M ) -> Result < ( ) , MailboxSenderError > {
1142
1139
self . send_with_headers ( cx, Attrs :: new ( ) , message)
1143
1140
}
1144
1141
1145
1142
/// Send a message to this port, provided a sending capability, such as
1146
1143
/// [`crate::actor::Instance`]. Additional context can be provided in the form of headers.
1147
1144
pub fn send_with_headers (
1148
1145
self ,
1149
- cx : & impl context:: Mailbox ,
1146
+ cx : & impl context:: Actor ,
1150
1147
mut headers : Attrs ,
1151
1148
message : M ,
1152
1149
) -> Result < ( ) , MailboxSenderError > {
0 commit comments