Enum ezno_parser::types::interface::InterfaceMember
source · pub enum InterfaceMember {
Method {
name: PropertyKey<PublicOrPrivate>,
type_parameters: Option<Vec<GenericTypeConstraint>>,
parameters: TypeAnnotationFunctionParameters,
return_type: Option<TypeAnnotation>,
is_optional: bool,
performs: Option<AnnotationPerforms>,
position: Span,
},
Property {
name: PropertyKey<PublicOrPrivate>,
type_annotation: TypeAnnotation,
is_readonly: bool,
is_optional: bool,
position: Span,
},
Indexer {
name: String,
indexer_type: TypeAnnotation,
return_type: TypeAnnotation,
is_readonly: bool,
position: Span,
},
Constructor {
parameters: TypeAnnotationFunctionParameters,
type_parameters: Option<Vec<GenericTypeConstraint>>,
return_type: Option<TypeAnnotation>,
is_readonly: bool,
position: Span,
},
Caller {
parameters: TypeAnnotationFunctionParameters,
type_parameters: Option<Vec<GenericTypeConstraint>>,
return_type: Option<TypeAnnotation>,
is_readonly: bool,
position: Span,
},
Rule {
parameter: String,
rule: TypeRule,
matching_type: Box<TypeAnnotation>,
optionality: Optionality,
is_readonly: bool,
output_type: Box<TypeAnnotation>,
position: Span,
},
Comment(String),
}
Expand description
This is also used for TypeAnnotation::ObjectLiteral
Variants§
Method
Fields
§
name: PropertyKey<PublicOrPrivate>
§
type_parameters: Option<Vec<GenericTypeConstraint>>
§
parameters: TypeAnnotationFunctionParameters
§
return_type: Option<TypeAnnotation>
§
performs: Option<AnnotationPerforms>
Property
Indexer
Constructor
Fields
§
parameters: TypeAnnotationFunctionParameters
§
type_parameters: Option<Vec<GenericTypeConstraint>>
§
return_type: Option<TypeAnnotation>
Example
new (...params: any[]): HTMLElement
Caller
Fields
§
parameters: TypeAnnotationFunctionParameters
§
type_parameters: Option<Vec<GenericTypeConstraint>>
§
return_type: Option<TypeAnnotation>
Rule
Comment(String)
Trait Implementations§
source§impl ASTNode for InterfaceMember
impl ASTNode for InterfaceMember
fn from_reader( reader: &mut impl TokenReader<TSXToken, Span>, state: &mut ParsingState, settings: &ParseOptions ) -> ParseResult<Self>
fn to_string_from_buffer<T: ToString>( &self, buf: &mut T, settings: &ToStringOptions, depth: u8 )
source§fn get_position(&self) -> Cow<'_, Span>
fn get_position(&self) -> Cow<'_, Span>
Returns position of node as span AS IT WAS PARSED. May be none if AST was doesn’t match anything in source
source§fn from_string(
source: String,
settings: ParseOptions,
source_id: SourceId,
offset: Option<usize>,
cursors: Vec<(usize, EmptyCursorId)>
) -> ParseResult<Self>
fn from_string( source: String, settings: ParseOptions, source_id: SourceId, offset: Option<usize>, cursors: Vec<(usize, EmptyCursorId)> ) -> ParseResult<Self>
From string, with default impl to call abstract method from_reader
source§fn to_string(&self, settings: &ToStringOptions) -> String
fn to_string(&self, settings: &ToStringOptions) -> String
Returns structure as valid string
source§impl Clone for InterfaceMember
impl Clone for InterfaceMember
source§fn clone(&self) -> InterfaceMember
fn clone(&self) -> InterfaceMember
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InterfaceMember
impl Debug for InterfaceMember
source§impl PartialEq<InterfaceMember> for InterfaceMember
impl PartialEq<InterfaceMember> for InterfaceMember
source§fn eq(&self, other: &InterfaceMember) -> bool
fn eq(&self, other: &InterfaceMember) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl SelfRustTokenize for InterfaceMember
impl SelfRustTokenize for InterfaceMember
fn append_to_token_stream(&self, token_stream: &mut TokenStream)
source§fn to_tokens(&self) -> TokenStream
fn to_tokens(&self) -> TokenStream
Returns the tokens used to construct self
impl Eq for InterfaceMember
impl StructuralEq for InterfaceMember
impl StructuralPartialEq for InterfaceMember
Auto Trait Implementations§
impl RefUnwindSafe for InterfaceMember
impl Send for InterfaceMember
impl Sync for InterfaceMember
impl Unpin for InterfaceMember
impl UnwindSafe for InterfaceMember
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
Mutably borrows from an owned value. Read more