Skip to content

Commit

Permalink
refactor: Update formatting of actor.rs and remote.rs files
Browse files Browse the repository at this point in the history
  • Loading branch information
j5ik2o committed Aug 29, 2024
1 parent 6c36ac2 commit d151b7d
Show file tree
Hide file tree
Showing 2 changed files with 479 additions and 563 deletions.
79 changes: 40 additions & 39 deletions core/src/generated/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Pid {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
#[prost(uint32, tag = "3")]
pub request_id: u32,
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
#[prost(uint32, tag = "3")]
pub request_id: u32,
}
/// user messages
#[allow(clippy::derive_partial_eq_without_eq)]
Expand All @@ -16,29 +16,29 @@ pub struct PoisonPill {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeadLetterResponse {
#[prost(message, optional, tag = "1")]
pub target: ::core::option::Option<Pid>,
#[prost(message, optional, tag = "1")]
pub target: ::core::option::Option<Pid>,
}
/// system messages
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Watch {
#[prost(message, optional, tag = "1")]
pub watcher: ::core::option::Option<Pid>,
#[prost(message, optional, tag = "1")]
pub watcher: ::core::option::Option<Pid>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Unwatch {
#[prost(message, optional, tag = "1")]
pub watcher: ::core::option::Option<Pid>,
#[prost(message, optional, tag = "1")]
pub watcher: ::core::option::Option<Pid>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Terminated {
#[prost(message, optional, tag = "1")]
pub who: ::core::option::Option<Pid>,
#[prost(enumeration = "TerminatedReason", tag = "2")]
pub why: i32,
#[prost(message, optional, tag = "1")]
pub who: ::core::option::Option<Pid>,
#[prost(enumeration = "TerminatedReason", tag = "2")]
pub why: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
Expand All @@ -49,35 +49,36 @@ pub struct Touch {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Touched {
#[prost(message, optional, tag = "1")]
pub who: ::core::option::Option<Pid>,
#[prost(message, optional, tag = "1")]
pub who: ::core::option::Option<Pid>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TerminatedReason {
Stopped = 0,
AddressTerminated = 1,
NotFound = 2,
Stopped = 0,
AddressTerminated = 1,
NotFound = 2,
}
impl TerminatedReason {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
TerminatedReason::Stopped => "Stopped",
TerminatedReason::AddressTerminated => "AddressTerminated",
TerminatedReason::NotFound => "NotFound",
}
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
TerminatedReason::Stopped => "Stopped",
TerminatedReason::AddressTerminated => "AddressTerminated",
TerminatedReason::NotFound => "NotFound",
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Stopped" => Some(Self::Stopped),
"AddressTerminated" => Some(Self::AddressTerminated),
"NotFound" => Some(Self::NotFound),
_ => None,
}
}

/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"Stopped" => Some(Self::Stopped),
"AddressTerminated" => Some(Self::AddressTerminated),
"NotFound" => Some(Self::NotFound),
_ => None,
}
}
}
Loading

0 comments on commit d151b7d

Please sign in to comment.