Enum witnext::Type [−][src]
Structure of all possible interface types.
Note that this is intended to match the interface types proposal itself.
Currently this is relatively close to that with just a few *.witx
extensions for now.
Variants
Record(RecordDatatype)
A structure with named field.
Variant(Variant)
An enumeration where a value is one of a number of variants.
Handle(HandleDatatype)
A “handle” which is an un-forgeable reference. Today this is an i32
where a module can’t forge and use integers it was not already given
access to.
List(TypeRef)
A list of a type, stored in linear memory.
Note that lists of char
are specialized to indicate strings.
Pointer(TypeRef)
A witx
-specific type representing a raw mutable pointer into linear
memory
ConstPointer(TypeRef)
A witx
-specific type representing a raw const pointer into linear
memory
Buffer(Buffer)
A buffer type representing a window in memory
Builtin(BuiltinType)
A builtin base-case type.
Implementations
impl Type
[src]
pub fn kind(&self) -> &'static str
[src]
Returns a human-readable string to describe this type.
pub fn all_bits_valid(&self) -> bool
[src]
Returns whether the in-memory representation of this type will always be valid regardless of the value of all the bits in memory.
This is only true for numerical types, pointers, and records of these values. This is used for canonical lifting/lowering of lists.
pub fn type_equal(&self, other: &Type) -> bool
[src]
Trait Implementations
impl Clone for Type
[src]
impl Debug for Type
[src]
impl Eq for Type
[src]
impl Hash for Type
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Layout for Type
[src]
fn mem_size_align(&self, export: bool) -> SizeAlign
[src]
fn mem_size(&self, export: bool) -> usize
[src]
fn mem_align(&self, export: bool) -> usize
[src]
impl PartialEq<Type> for Type
[src]
impl StructuralEq for Type
[src]
impl StructuralPartialEq for Type
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Type
impl !Send for Type
impl !Sync for Type
impl Unpin for Type
impl !UnwindSafe for Type
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,