Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
model-entity
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rust common
model-entity
Commits
93ee7d99
Commit
93ee7d99
authored
Nov 25, 2024
by
xuwencheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade
parent
851377e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
launch.rs
src/event/launch.rs
+18
-18
No files found.
src/event/launch.rs
View file @
93ee7d99
...
@@ -34,25 +34,25 @@ pub enum Event {
...
@@ -34,25 +34,25 @@ pub enum Event {
Kill
,
Kill
,
}
}
impl
Event
{
//
impl Event {
pub
fn
succ
(
self
,
extra
:
impl
AsRef
<
str
>
)
->
LaunchEvent
{
//
pub fn succ(self, extra: impl AsRef<str>) -> LaunchEvent {
LaunchEvent
{
//
LaunchEvent {
event
:
self
.as_ref
()
.to_string
(),
//
event: self.as_ref().to_string(),
status
:
Status
::
Success
as
i32
,
//
status: Status::Success as i32,
desc
:
"成功"
.to_string
(),
//
desc: "成功".to_string(),
extra
:
Some
(
extra
.as_ref
()
.to_string
()),
//
extra: Some(extra.as_ref().to_string()),
}
//
}
}
//
}
pub
fn
fail
(
self
,
extra
:
impl
AsRef
<
str
>
)
->
LaunchEvent
{
//
pub fn fail(self, extra: impl AsRef<str>) -> LaunchEvent {
LaunchEvent
{
//
LaunchEvent {
event
:
self
.as_ref
()
.to_string
(),
//
event: self.as_ref().to_string(),
status
:
Status
::
Fail
as
i32
,
//
status: Status::Fail as i32,
desc
:
"失败"
.to_string
(),
//
desc: "失败".to_string(),
extra
:
Some
(
extra
.as_ref
()
.to_string
()),
//
extra: Some(extra.as_ref().to_string()),
}
//
}
}
//
}
}
//
}
#[derive(Debug,
Clone,
Deserialize,
Serialize)]
#[derive(Debug,
Clone,
Deserialize,
Serialize)]
pub
struct
LaunchEvent
{
pub
struct
LaunchEvent
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment