[][src]Struct binjs::meta::spec::Interface

pub struct Interface { /* fields omitted */ }

Representation of an interface in a grammar declaration.

Interfaces represent nodes in the AST. Each interface has a name, a type, defines properties (also known as attribute in webidl) which hold values.

Methods

impl Interface[src]

pub fn contents(&self) -> &Obj[src]

Returns the full list of fields for this structure. This method is in charge of:

  • ensuring that the fields of parent structures are properly accounted for;
  • disregarding ignored fields (i.e. position, type);
  • disregarding fields with a single possible value.

pub fn name(&self) -> &NodeName[src]

Returns the name of the interface.

pub fn spec(&self) -> TypeSpec[src]

Returns a type specification for this interface.

The result is a NamedType with this interface's name.

pub fn type_(&self) -> Type[src]

pub fn get_field_by_name(&self, name: &FieldName) -> Option<&Field>[src]

pub fn is_scope(&self) -> bool[src]

pub fn scoped_dictionary(&self) -> Option<FieldName>[src]

If this interface introduces a scoped dictionary change, return Some(field_name) where field_name is the field of this interface containing the name of the dictionary to use in the sub-ast.

Trait Implementations

impl Debug for Interface[src]

impl Pick for Interface[src]

fn random<T>(&self, syntax: &Spec, rng: &mut T, depth_limit: isize) -> Value where
    T: Rng
[src]

Generate a random instance of this interface matching the syntax.

Auto Trait Implementations

impl !RefUnwindSafe for Interface

impl !Send for Interface

impl !Sync for Interface

impl Unpin for Interface

impl UnwindSafe for Interface

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]