cluFullTransmute
A more complete and extended version of data type conversion without constraint checks.
Library Features
- Casting any type A to any type B with generic data without and with data dimension checking.
- Ability to use transmutation in constant functions in very old versions of rust.
- Possibility of delayed transmutation through contracts.
- Ability to work without the standard library.
!!! ATTENTION !!!
- When converting types without checking the size of the data, you really need to understand what you are doing.
- You must understand the specifics of the platform you are using.
Use
1. GenericType
use Display;
use transmute_or_panic;
/// Implementation of a simple transmutation with a generic parameter inside.
2. Contract
use Contract;
/*
For example, we will sign a contract to convert a String to a Vec<u8>,
although this may not be exactly the case.
Contracts are needed to create more secure APIs using transmutation in
situations where it can't be proven.
*/
///
License
Copyright 2022 #UlinProject Denis Kotlyarov (Денис Котляров)
Licensed under the Apache License, Version 2.0