pub struct IOCondition: u32 {// here ": u32"
#[doc(alias = "G_IO_IN")]
const IN = ffi::G_IO_IN as u32;
}
What does : u32 means?
pub struct IOCondition: u32 {// here ": u32"
#[doc(alias = "G_IO_IN")]
const IN = ffi::G_IO_IN as u32;
}
What does : u32 means?
Are you using the bitflags
macro/crate? If so, you can read its documentation. (By the way, the syntax is meant to be evocative of "supertype" or "supertrait" constraints – logically, it couldn't really mean anything other than "this is the underlying type of the bitflags newtype" in this context. And this syntax isn't valid outside the invocation of the bitflags!
macro, it's not something Rust recognizes.)
Yes, that's that create. I never saw syntax like this in rust. And as I agree that the obvious meaning which I also suspected to be of underlying type, but saying that it couldn't mean anything else it is a bit of long shot. Things can always mean whatever we want them too.
Particularly in a macro.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.