@@ -52,40 +52,6 @@ open class RustBuffer : Structure() {
5252 }
5353}
5454
55- /* *
56- * The equivalent of the `*mut RustBuffer` type.
57- * Required for callbacks taking in an out pointer.
58- *
59- * Size is the sum of all values in the struct.
60- *
61- * @suppress
62- */
63- class RustBufferByReference : ByReference (16 ) {
64- /* *
65- * Set the pointed-to `RustBuffer` to the given value.
66- */
67- fun setValue (value : RustBuffer .ByValue ) {
68- // NOTE: The offsets are as they are in the C-like struct.
69- val pointer = getPointer()
70- pointer.setLong(0 , value.capacity)
71- pointer.setLong(8 , value.len)
72- pointer.setPointer(16 , value.data)
73- }
74-
75- /* *
76- * Get a `RustBuffer.ByValue` from this reference.
77- */
78- fun getValue (): RustBuffer .ByValue {
79- val pointer = getPointer()
80- val value = RustBuffer .ByValue ()
81- value.writeField(" capacity" , pointer.getLong(0 ))
82- value.writeField(" len" , pointer.getLong(8 ))
83- value.writeField(" data" , pointer.getLong(16 ))
84-
85- return value
86- }
87- }
88-
8955// This is a helper for safely passing byte references into the rust code.
9056// It's not actually used at the moment, because there aren't many things that you
9157// can take a direct pointer to in the JVM, and if we're going to copy something
0 commit comments