Comments (3)
I believe the idea is that any fields which are PhantomData
are not even included in a type definition at all (since they have no encoded representation in SCALE). @Robbepop might elaborate more what he means.
from scale-info.
Probably will need to update derive macro to skip over PhantomData fields.
Note that checks like these should always happen on a type level, never on a syntactical level so this will get a bit more involved in a proc. macro. You might be in need of additional helper traits to help in this process.
from scale-info.
Do I understand this correctly? We want this:
Lines 71 to 77 in 4188f02
β¦to be this:
assert_type!(
i32,
Type::builder()
.path(Path::prelude("PhantomData"))
.type_params(tuple_meta_type!(i32))
.composite(Fields::unit())
);
(and pass, naturally)?
from scale-info.
Related Issues (20)
- Add UI tests for crate renaming
- Support `r#` in the module path HOT 2
- Regression from latest release with crate resolution HOT 5
- trait bound `H256: TypeInfo` is not satisfied; `TypeInfo` is not implemented for `H256, H160, H64, ethereum_types::U256` HOT 3
- Could we have a rename function? HOT 4
- Strip pretty-printed invisible delimiters for type names
- I found a little flaws in `scale-info` doc V2.1.2
- bitvec 1.0 HOT 1
- Should PortableType be pub use?
- Can scale-info support `skip` or `ignore` for some struct field? HOT 1
- Don't enable bitvec when "std" feature is enabled
- Generated metadata includes `struct NonZeroU64(NonZeroU64)`, which is impossible to construct HOT 3
- Implement stable type id HOT 6
- Implement `TypeInfo` for `Duration`
- Update CI
- scale info is no longer no_std compatible HOT 1
- Optionally allow encoding `PhantomData<T>` types HOT 3
- What are `I256` and `U256` for? HOT 1
- Not an issue, but can you type info to have reflections in rust ? HOT 2
- New release? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scale-info.