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
f2480d41
Commit
f2480d41
authored
Nov 22, 2024
by
xuwencheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade
parent
3adf16db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
launch.rs
src/event/launch.rs
+13
-8
No files found.
src/event/launch.rs
View file @
f2480d41
...
...
@@ -35,19 +35,24 @@ pub enum Event {
}
impl
Event
{
pub
fn
event
(
self
,
status
:
Status
,
extra
:
impl
AsRef
<
str
>
)
->
LaunchEvent
{
let
desc
=
if
status
.eq
(
&
Status
::
Success
)
{
"成功"
}
else
{
"失败"
};
pub
fn
succ
(
self
,
extra
:
impl
AsRef
<
str
>
)
->
LaunchEvent
{
LaunchEvent
{
event
:
self
.as_ref
()
.to_string
(),
status
:
statu
s
as
i32
,
desc
:
desc
.to_string
(),
status
:
Status
::
Succes
s
as
i32
,
desc
:
"成功"
.to_string
(),
extra
:
Some
(
extra
.as_ref
()
.to_string
()),
}
}
pub
fn
fail
(
self
,
extra
:
impl
AsRef
<
str
>
)
->
LaunchEvent
{
LaunchEvent
{
event
:
self
.as_ref
()
.to_string
(),
status
:
Status
::
Fail
as
i32
,
desc
:
"失败"
.to_string
(),
extra
:
Some
(
extra
.as_ref
()
.to_string
()),
}
}
}
#[derive(Debug,
Clone,
Deserialize,
Serialize)]
...
...
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