pub enum Token {
Show 397 variants
Error(),
Always(),
And(),
Assign(),
Begin(),
Buf(),
Bufif0(),
Bufif1(),
Case(),
Casex(),
Casez(),
Cmos(),
Deassign(),
Default(),
Defparam(),
Disable(),
Edge(),
Else(),
End(),
Endcase(),
Endfunction(),
Endmodule(),
Endprimitive(),
Endspecify(),
Endtable(),
Endtask(),
Event(),
For(),
Force(),
Forever(),
Fork(),
Function(),
Highz0(),
Highz1(),
If(),
Ifnone(),
Initial(),
Inout(),
Input(),
Integer(),
Join(),
Large(),
Macromodule(),
Medium(),
Module(),
Nand(),
Negedge(),
Nmos(),
Nor(),
Not(),
Notif0(),
Notif1(),
Or(),
Output(),
Parameter(),
Pmos(),
Posedge(),
Primitive(),
Pull0(),
Pull1(),
Pulldown(),
Pullup(),
Rcmos(),
Real(),
Realtime(),
Reg(),
Release(),
Repeat(),
Rnmos(),
Rpmos(),
Rtran(),
Rtranif0(),
Rtranif1(),
Scalared(),
Small(),
Specify(),
Specparam(),
Strong0(),
Strong1(),
Supply0(),
Supply1(),
Table(),
Task(),
Time(),
Tran(),
Tranif0(),
Tranif1(),
Tri(),
Tri0(),
Tri1(),
Triand(),
Trior(),
Trireg(),
Vectored(),
Wait(),
Wand(),
Weak0(),
Weak1(),
While(),
Wire(),
Wor(),
Xnor(),
Xor(),
Automatic(),
Cell(),
Config(),
Design(),
Endconfig(),
Endgenerate(),
Generate(),
Genvar(),
Incdir(),
Include(),
Instance(),
Liblist(),
Library(),
Localparam(),
Noshowcancelled(),
PulsestyleOndetect(),
PulsestyleOnevent(),
Showcancelled(),
Signed(),
Unsigned(),
Use(),
Uwire(),
Alias(),
AlwaysComb(),
AlwaysFf(),
AlwaysLatch(),
Assert(),
Assume(),
Before(),
Bind(),
Bins(),
Binsof(),
Bit(),
Break(),
Byte(),
Chandle(),
Class(),
Clocking(),
Const(),
Constraint(),
Context(),
Continue(),
Cover(),
Covergroup(),
Coverpoint(),
Cross(),
Dist(),
Do(),
Endclass(),
Endclocking(),
Endgroup(),
Endinterface(),
Endpackage(),
Endprogram(),
Endproperty(),
Endsequence(),
Enum(),
Expect(),
Export(),
Extends(),
Extern(),
Final(),
FirstMatch(),
Foreach(),
Forkjoin(),
Iff(),
IgnoreBins(),
IllegalBins(),
Import(),
Inside(),
Int(),
Interface(),
Intersect(),
JoinAny(),
JoinNone(),
Local(),
Logic(),
Longint(),
Matches(),
Modport(),
New(),
Null(),
Package(),
Packed(),
Priority(),
Program(),
Property(),
Protected(),
Pure(),
Rand(),
Randc(),
Randcase(),
Randsequence(),
Ref(),
Return(),
Sequence(),
Shortint(),
Shortreal(),
Solve(),
Static(),
String(),
Struct(),
Super(),
Tagged(),
This(),
Throughout(),
Timeprecision(),
Timeunit(),
Type(),
Typedef(),
Union(),
Unique(),
Var(),
Virtual(),
Void(),
WaitOrder(),
Wildcard(),
With(),
Within(),
AcceptOn(),
Checker(),
Endchecker(),
Eventually(),
Global(),
Implies(),
Let(),
Nexttime(),
RejectOn(),
Restrict(),
SAlways(),
SEventually(),
SNexttime(),
SUntil(),
SUntilWith(),
Strong(),
SyncAcceptOn(),
SyncRejectOn(),
Unique0(),
Until(),
UntilWith(),
Untyped(),
Weak(),
Implements(),
Interconnect(),
Nettype(),
Soft(),
DirUnderscoreFile(),
DirUnderscoreLine(),
DirBeginKeywords(),
DirCelldefine(),
DirDefaultNettype(),
DirDefine(),
DirElse(),
DirElsif(),
DirEndKeywords(),
DirEndcelldefine(),
DirEndif(),
DirIfdef(),
DirIfndef(),
DirInclude(),
DirLine(),
DirNounconnectedDrive(),
DirPragma(),
DirResetall(),
DirTimescale(),
DirUnconnectedDrive(),
DirUndef(),
DirUndefineall(),
Plus(),
Minus(),
Exclamation(),
Quest(),
Tilde(),
Amp(),
TildeAmp(),
Pipe(),
TildePipe(),
Caret(),
TildeCaret(),
CaretTilde(),
Star(),
Slash(),
Percent(),
EqEq(),
ExclEq(),
PlusEq(),
MinusEq(),
StarEq(),
SlashEq(),
PercentEq(),
AmpEq(),
PipeEq(),
CaretEq(),
EqEqEq(),
ExclEqEq(),
EqEqQuest(),
ExclEqQuest(),
AmpAmp(),
AmpAmpAmp(),
PipePipe(),
StarStar(),
Lt(),
LtEq(),
Gt(),
GtEq(),
GtGt(),
LtLt(),
GtGtEq(),
LtLtEq(),
GtGtGt(),
LtLtLt(),
GtGtGtEq(),
LtLtLtEq(),
MinusGt(),
MinusGtGt(),
LtMinusGt(),
PlusPlus(),
MinusMinus(),
PlusColon(),
MinusColon(),
PlusSlashMinus(),
PlusPercentMinus(),
Paren(),
EParen(),
Bracket(),
EBracket(),
Brace(),
EBrace(),
Colon(),
SColon(),
Apost(),
Comma(),
Period(),
Pound(),
Dollar(),
At(),
AtAt(),
Eq(),
ColonColon(),
ColonEq(),
ColonSlash(),
PoundPound(),
PoundMinusPound(),
PoundEqPound(),
EqGt(),
StarGt(),
PipeMinusGt(),
PipeEqGt(),
Bslash(),
Std(),
PathpulseDollar(),
Option(),
TypeOption(),
Randomize(),
Sample(),
OneStep(),
DollarSetup(),
DollarHold(),
DollarSetuphold(),
DollarRecovery(),
DollarRemoval(),
DollarRecrem(),
DollarSkew(),
DollarTimeskew(),
DollarFullskew(),
DollarPeriod(),
DollarWidth(),
DollarNochange(),
DollarRoot(),
DollarUnit(),
DollarFatal(),
DollarError(),
DollarWarning(),
DollarInfo(),
OnelineComment {
text: String,
},
BlockComment {
text: String,
},
UnsignedNumber {
text: String,
},
FixedPointNumber {
text: String,
},
BinaryNumber {
text: String,
},
OctalNumber {
text: String,
},
DecimalNumber {
text: String,
},
HexNumber {
text: String,
},
ScientificNumber {
text: String,
},
UnbasedUnsizedLiteral {
text: String,
},
SystemTfIdentifier {
text: String,
},
SimpleIdentifier {
text: String,
},
EscapedIdentifier {
text: String,
},
PreprocessorIdentifier {
text: String,
},
TextMacro {
text: String,
},
StringLiteral {
text: String,
},
PreprocessorStringLiteral {
text: String,
},
TripleQuoteStringLiteral {
text: String,
},
PreprocessorTripleQuoteStringLiteral {
text: String,
},
Newline(),
}Expand description
A wrapper around scarf_parser::Token
Variants§
Error()
Always()
And()
Assign()
Begin()
Buf()
Bufif0()
Bufif1()
Case()
Casex()
Casez()
Cmos()
Deassign()
Default()
Defparam()
Disable()
Edge()
Else()
End()
Endcase()
Endfunction()
Endmodule()
Endprimitive()
Endspecify()
Endtable()
Endtask()
Event()
For()
Force()
Forever()
Fork()
Function()
Highz0()
Highz1()
If()
Ifnone()
Initial()
Inout()
Input()
Integer()
Join()
Large()
Macromodule()
Medium()
Module()
Nand()
Negedge()
Nmos()
Nor()
Not()
Notif0()
Notif1()
Or()
Output()
Parameter()
Pmos()
Posedge()
Primitive()
Pull0()
Pull1()
Pulldown()
Pullup()
Rcmos()
Real()
Realtime()
Reg()
Release()
Repeat()
Rnmos()
Rpmos()
Rtran()
Rtranif0()
Rtranif1()
Scalared()
Small()
Specify()
Specparam()
Strong0()
Strong1()
Supply0()
Supply1()
Table()
Task()
Time()
Tran()
Tranif0()
Tranif1()
Tri()
Tri0()
Tri1()
Triand()
Trior()
Trireg()
Vectored()
Wait()
Wand()
Weak0()
Weak1()
While()
Wire()
Wor()
Xnor()
Xor()
Automatic()
Cell()
Config()
Design()
Endconfig()
Endgenerate()
Generate()
Genvar()
Incdir()
Include()
Instance()
Liblist()
Library()
Localparam()
Noshowcancelled()
PulsestyleOndetect()
PulsestyleOnevent()
Showcancelled()
Signed()
Unsigned()
Use()
Uwire()
Alias()
AlwaysComb()
AlwaysFf()
AlwaysLatch()
Assert()
Assume()
Before()
Bind()
Bins()
Binsof()
Bit()
Break()
Byte()
Chandle()
Class()
Clocking()
Const()
Constraint()
Context()
Continue()
Cover()
Covergroup()
Coverpoint()
Cross()
Dist()
Do()
Endclass()
Endclocking()
Endgroup()
Endinterface()
Endpackage()
Endprogram()
Endproperty()
Endsequence()
Enum()
Expect()
Export()
Extends()
Extern()
Final()
FirstMatch()
Foreach()
Forkjoin()
Iff()
IgnoreBins()
IllegalBins()
Import()
Inside()
Int()
Interface()
Intersect()
JoinAny()
JoinNone()
Local()
Logic()
Longint()
Matches()
Modport()
New()
Null()
Package()
Packed()
Priority()
Program()
Property()
Protected()
Pure()
Rand()
Randc()
Randcase()
Randsequence()
Ref()
Return()
Sequence()
Shortint()
Shortreal()
Solve()
Static()
String()
Struct()
Super()
Tagged()
This()
Throughout()
Timeprecision()
Timeunit()
Type()
Typedef()
Union()
Unique()
Var()
Virtual()
Void()
WaitOrder()
Wildcard()
With()
Within()
AcceptOn()
Checker()
Endchecker()
Eventually()
Global()
Implies()
Let()
Nexttime()
RejectOn()
Restrict()
SAlways()
SEventually()
SNexttime()
SUntil()
SUntilWith()
Strong()
SyncAcceptOn()
SyncRejectOn()
Unique0()
Until()
UntilWith()
Untyped()
Weak()
Implements()
Interconnect()
Nettype()
Soft()
DirUnderscoreFile()
DirUnderscoreLine()
DirBeginKeywords()
DirCelldefine()
DirDefaultNettype()
DirDefine()
DirElse()
DirElsif()
DirEndKeywords()
DirEndcelldefine()
DirEndif()
DirIfdef()
DirIfndef()
DirInclude()
DirLine()
DirNounconnectedDrive()
DirPragma()
DirResetall()
DirTimescale()
DirUnconnectedDrive()
DirUndef()
DirUndefineall()
Plus()
Minus()
Exclamation()
Quest()
Tilde()
Amp()
TildeAmp()
Pipe()
TildePipe()
Caret()
TildeCaret()
CaretTilde()
Star()
Slash()
Percent()
EqEq()
ExclEq()
PlusEq()
MinusEq()
StarEq()
SlashEq()
PercentEq()
AmpEq()
PipeEq()
CaretEq()
EqEqEq()
ExclEqEq()
EqEqQuest()
ExclEqQuest()
AmpAmp()
AmpAmpAmp()
PipePipe()
StarStar()
Lt()
LtEq()
Gt()
GtEq()
GtGt()
LtLt()
GtGtEq()
LtLtEq()
GtGtGt()
LtLtLt()
GtGtGtEq()
LtLtLtEq()
MinusGt()
MinusGtGt()
LtMinusGt()
PlusPlus()
MinusMinus()
PlusColon()
MinusColon()
PlusSlashMinus()
PlusPercentMinus()
Paren()
EParen()
Bracket()
EBracket()
Brace()
EBrace()
Colon()
SColon()
Apost()
Comma()
Period()
Pound()
Dollar()
At()
AtAt()
Eq()
ColonColon()
ColonEq()
ColonSlash()
PoundPound()
PoundMinusPound()
PoundEqPound()
EqGt()
StarGt()
PipeMinusGt()
PipeEqGt()
Bslash()
Std()
PathpulseDollar()
Option()
TypeOption()
Randomize()
Sample()
OneStep()
DollarSetup()
DollarHold()
DollarSetuphold()
DollarRecovery()
DollarRemoval()
DollarRecrem()
DollarSkew()
DollarTimeskew()
DollarFullskew()
DollarPeriod()
DollarWidth()
DollarNochange()
DollarRoot()
DollarUnit()
DollarFatal()
DollarError()
DollarWarning()
DollarInfo()
OnelineComment
BlockComment
UnsignedNumber
FixedPointNumber
BinaryNumber
OctalNumber
DecimalNumber
HexNumber
ScientificNumber
UnbasedUnsizedLiteral
SystemTfIdentifier
SimpleIdentifier
EscapedIdentifier
PreprocessorIdentifier
TextMacro
StringLiteral
PreprocessorStringLiteral
TripleQuoteStringLiteral
PreprocessorTripleQuoteStringLiteral
Newline()
Trait Implementations§
impl Eq for Token
Source§impl<'a, 'py> FromPyObject<'a, 'py> for Tokenwhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for Tokenwhere
Self: Clone,
Source§const INPUT_TYPE: PyStaticExpr = <Token as ::pyo3::PyTypeInfo>::TYPE_HINT
const INPUT_TYPE: PyStaticExpr = <Token as ::pyo3::PyTypeInfo>::TYPE_HINT
Source§type Error = PyClassGuardError<'a, 'py>
type Error = PyClassGuardError<'a, 'py>
Source§impl<'py> IntoPyObject<'py> for Token
impl<'py> IntoPyObject<'py> for Token
Source§const OUTPUT_TYPE: PyStaticExpr = <Token as ::pyo3::PyTypeInfo>::TYPE_HINT
const OUTPUT_TYPE: PyStaticExpr = <Token as ::pyo3::PyTypeInfo>::TYPE_HINT
Source§type Output = Bound<'py, <Token as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <Token as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClassBaseType for Token
impl PyClassBaseType for Token
type LayoutAsBase = <Token as PyClassImpl>::Layout
type BaseNativeType = <Token as PyClassImpl>::BaseNativeType
type Initializer = PyClassInitializer<Token>
type PyClassMutability = <Token as PyClassImpl>::PyClassMutability
Source§impl PyClassImpl for Token
impl PyClassImpl for Token
Source§const IS_BASETYPE: bool = true
const IS_BASETYPE: bool = true
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// A wrapper around [`scarf_parser::Token`]
const RAW_DOC: &'static CStr = /// A wrapper around [`scarf_parser::Token`]
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<Token as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<Token>
type Layout = <<Token as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<Token>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
Source§fn dict_offset() -> Option<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
Source§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyTypeInfo for Token
impl PyTypeInfo for Token
Source§const NAME: &str = <Self as ::pyo3::PyClass>::NAME
const NAME: &str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
Source§const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
Source§const TYPE_HINT: PyStaticExpr
const TYPE_HINT: PyStaticExpr
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnsafeUnpin for Token
impl UnwindSafe for Token
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<'py, T> FromPyObjectOwned<'py> for Twhere
T: for<'a> FromPyObject<'a, 'py>,
Source§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.Source§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);