pub enum BuiltinType {
Char,
U8 {
lang_c_char: bool,
},
U16,
U32 {
lang_ptr_size: bool,
},
U64,
S8,
S16,
S32,
S64,
F32,
F64,
}Variants§
Char
This is a 32-bit unicode scalar value, not a code point.
Same as the Rust language’s char type.
U8
An 8-bit unsigned integer.
Fields
lang_c_char: boolIndicates whether this type is intended to represent the char
type in the C language. The C char type is often unsigned, but
it’s language-specific. At an interface-types level this is an
unsigned byte but binding generators may wish to bind this as the
language-specific representation for a C character instead.
This is also currently used exclusively in conjunction with @witx pointer to hint that it’s pointing to unicode string data as well.
U16
A 16-bit unsigned integer.
U32
A 32-bit unsigned integer.
Fields
lang_ptr_size: boolIndicates that this 32-bit value should actually be considered a
pointer-like value in language bindings. At the interface types
layer this is always a 32-bit unsigned value, but binding
generators may wish to instead bind this as the equivalent of C’s
size_t for convenience with other APIs.
This allows witx authors to communicate the intent that the argument or return-value is pointer-like.
U64
A 64-bit unsigned integer.
S8
An 8-bit signed integer
S16
A 16-bit signed integer
S32
A 32-bit signed integer
S64
A 64-bit signed integer
F32
A 32-bit floating point value.
F64
A 64-bit floating point value.
Implementations§
Trait Implementations§
Source§impl Clone for BuiltinType
impl Clone for BuiltinType
Source§fn clone(&self) -> BuiltinType
fn clone(&self) -> BuiltinType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BuiltinType
Source§impl Debug for BuiltinType
impl Debug for BuiltinType
impl Eq for BuiltinType
Source§impl Hash for BuiltinType
impl Hash for BuiltinType
Source§impl Layout for BuiltinType
impl Layout for BuiltinType
Source§impl Parse<'_> for BuiltinType
impl Parse<'_> for BuiltinType
Source§impl PartialEq for BuiltinType
impl PartialEq for BuiltinType
Source§impl Peek for BuiltinType
impl Peek for BuiltinType
Source§impl Representable for BuiltinType
impl Representable for BuiltinType
fn representable(&self, by: &BuiltinType) -> RepEquality
impl StructuralPartialEq for BuiltinType
Auto Trait Implementations§
impl Freeze for BuiltinType
impl RefUnwindSafe for BuiltinType
impl Send for BuiltinType
impl Sync for BuiltinType
impl Unpin for BuiltinType
impl UnsafeUnpin for BuiltinType
impl UnwindSafe for BuiltinType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more