FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
openapi/java/src/types/mod.rs at main · noneback/openapi · GitHub
noneback
/
openapi
Public
forked from
longbridge/openapi
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
openapi
/
java
/
src
/
types
/
mod.rs
Copy path
More file actions
More file actions
Latest commit
History
History
History
74 lines (64 loc) · 1.66 KB
Breadcrumbs
openapi
/
java
/
src
/
types
/
mod.rs
Copy path
File metadata and controls
74 lines (64 loc) · 1.66 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
mod
classes
;
mod
datetime
;
mod
decimal
;
mod
enum_types
;
mod
object_array
;
mod
optional
;
mod
primary_array
;
mod
primary_types
;
mod
string
;
mod
sub_flags
;
use
std
::
borrow
::
Cow
;
use
jni
::
{
JNIEnv
,
errors
::
Result
,
objects
::
{
GlobalRef
,
JObject
,
JValueOwned
}
,
strings
::
JNIString
,
}
;
pub
(
crate
)
use
self
::
{
classes
::
{
CreateWatchlistGroupResponse
,
SecurityCalcIndex
,
StockPosition
,
StockPositionChannel
,
StockPositionsResponse
,
}
,
object_array
::
ObjectArray
,
primary_array
::
PrimaryArray
,
}
;
pub
(
crate
)
trait
ClassLoader
{
fn
init
(
env
:
&
mut
JNIEnv
)
;
fn
class_ref
(
)
->
GlobalRef
;
}
pub
(
crate
)
trait
FromJValue
:
Sized
{
fn
from_jvalue
(
env
:
&
mut
JNIEnv
,
value
:
JValueOwned
)
->
Result
<
Self
>
;
}
pub
(
crate
)
trait
IntoJValue
{
fn
into_jvalue
<
'
a
>
(
self
,
env
:
&
mut
JNIEnv
<
'
a
>
)
->
Result
<
JValueOwned
<
'
a
>
>
;
}
impl
IntoJValue
for
(
)
{
#
[
inline
]
fn
into_jvalue
<
'
a
>
(
self
,
_env
:
&
mut
JNIEnv
<
'
a
>
)
->
Result
<
JValueOwned
<
'
a
>
>
{
Ok
(
JValueOwned
::
from
(
JObject
::
null
(
)
)
)
}
}
pub
(
crate
)
trait
JSignature
{
fn
signature
(
)
->
Cow
<
'
static
,
str
>
;
}
#
[
inline
]
pub
(
crate
)
fn
set_field
<
'
a
,
O
,
N
,
T
>
(
env
:
&
mut
JNIEnv
<
'
a
>
,
obj
:
O
,
name
:
N
,
value
:
T
)
->
Result
<
(
)
>
where
O
:
AsRef
<
JObject
<
'
a
>
>
,
N
:
Into
<
JNIString
>
,
T
:
IntoJValue
+
JSignature
,
{
let
value = value
.
into_jvalue
(
env
)
?
;
env
.
set_field
(
obj
,
name
,
T
::
signature
(
)
,
value
.
borrow
(
)
)
}
#
[
inline
]
pub
(
crate
)
fn
get_field
<
'
a
,
O
,
N
,
T
>
(
env
:
&
mut
JNIEnv
<
'
_
>
,
obj
:
O
,
name
:
N
)
->
Result
<
T
>
where
O
:
AsRef
<
JObject
<
'
a
>
>
,
N
:
Into
<
JNIString
>
,
T
:
FromJValue
+
JSignature
,
{
let
value = env
.
get_field
(
obj
,
name
,
T
::
signature
(
)
)
?
;
T
::
from_jvalue
(
env
,
value
)
}
Back
|
FazBrowse Home
|
New Git URL