generated from oovm/RustTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
12 deletions.
There are no files selected for viewing
24 changes: 15 additions & 9 deletions
24
projects/valkyrie-std/source/collection/primitive_array/PrimitiveArrayDynamic.vk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 16 additions & 3 deletions
19
projects/valkyrie-std/source/collection/primitive_array/PrimitiveEntry.vk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
namespace? package.collections.vector; | ||
|
||
|
||
class PrimitiveEntry<T> { | ||
structure PrimitiveEntry<T> { | ||
private pointer: usize, | ||
private element: PhantomData<T>, | ||
} | ||
|
||
structure MemoryEntry { | ||
private pointer: usize, | ||
private size: usize, | ||
} | ||
|
||
#[native] | ||
extends PrimitiveEntry<T> { | ||
private pointer: usize, | ||
private element: PhantomData<T>, | ||
violance constructor(pointer: usize) { | ||
self.pointer = pointer; | ||
} | ||
violance reinterpret<U>(move self): PrimitiveEntry<U> { | ||
self.element = PhantomData::<U>(); | ||
self | ||
} | ||
violance recast(move self): T { | ||
|
||
} | ||
} |