Enum witx::BuiltinType
source · [−]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
Fields
lang_c_char: bool
Indicates 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.
An 8-bit unsigned integer.
U16
A 16-bit unsigned integer.
U32
Fields
lang_ptr_size: bool
Indicates 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.
A 32-bit unsigned integer.
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
sourceimpl BuiltinType
impl BuiltinType
sourceimpl BuiltinType
impl BuiltinType
Trait Implementations
sourceimpl Clone for BuiltinType
impl Clone for BuiltinType
sourcefn clone(&self) -> BuiltinType
fn clone(&self) -> BuiltinType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for BuiltinType
impl Debug for BuiltinType
sourceimpl Hash for BuiltinType
impl Hash for BuiltinType
sourceimpl Layout for BuiltinType
impl Layout for BuiltinType
sourceimpl Parse<'_> for BuiltinType
impl Parse<'_> for BuiltinType
sourceimpl PartialEq<BuiltinType> for BuiltinType
impl PartialEq<BuiltinType> for BuiltinType
sourcefn eq(&self, other: &BuiltinType) -> bool
fn eq(&self, other: &BuiltinType) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BuiltinType) -> bool
fn ne(&self, other: &BuiltinType) -> bool
This method tests for !=
.
sourceimpl Peek for BuiltinType
impl Peek for BuiltinType
sourceimpl Representable for BuiltinType
impl Representable for BuiltinType
fn representable(&self, by: &Self) -> RepEquality
impl Copy for BuiltinType
impl Eq for BuiltinType
impl StructuralEq for BuiltinType
impl StructuralPartialEq for BuiltinType
Auto Trait Implementations
impl RefUnwindSafe for BuiltinType
impl Send for BuiltinType
impl Sync for BuiltinType
impl Unpin for BuiltinType
impl UnwindSafe for BuiltinType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more