[−][src]Enum binjs_meta::spec::TypeSpec
The contents of a type, typically that of a field.
Note that we generally use Type, to represent
the fact that some fields accept null while
others do not.
Variants
An array of values of the same type.
Fields of Array
NamedType(NodeName)TypeSum(TypeSum)A boolean.
A string.
A number, as per JavaScript specifications.
A number of bytes in the binary file.
This spec is used only internally, as a hidden field injected by deanonymization, to represent lazy fields.
Nothing.
For the moment, this spec is used only internally.
A string used to represent something bound in a scope (i.e. a variable, but not a property).
At this level, we make no distinction between Identifier and IdentifierName.
Actually maps to a subset of IdentifierName in webidl.
A key for a property. For the time being, we make no distinction between variants such
as LiteralPropertyName and IdentifierName-as-property-keys.
Methods
impl TypeSpec[src]
pub fn array(self) -> Type[src]
pub fn non_empty_array(self) -> Type[src]
pub fn optional(self) -> Option<Type>[src]
pub fn required(self) -> Type[src]
pub fn typenames<'a>(&'a self) -> HashSet<&'a NodeName>[src]
pub fn get_primitive(&self, spec: &Spec) -> Option<IsNullable<Primitive>>[src]
Trait Implementations
impl Clone for TypeSpec[src]
impl Debug for TypeSpec[src]
impl Eq for TypeSpec[src]
impl HasInterfaces for TypeSpec[src]
impl PartialEq<TypeSpec> for TypeSpec[src]
impl StructuralEq for TypeSpec[src]
impl StructuralPartialEq for TypeSpec[src]
Auto Trait Implementations
impl !RefUnwindSafe for TypeSpec
impl !Send for TypeSpec
impl !Sync for TypeSpec
impl Unpin for TypeSpec
impl UnwindSafe for TypeSpec
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,
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.
fn to_owned(&self) -> T[src]
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.
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>,