pub struct ParsedDocblock {Show 39 fields
pub params: Vec<(String, Type)>,
pub return_type: Option<Type>,
pub var_type: Option<Type>,
pub var_name: Option<String>,
pub templates: Vec<(String, Option<Type>, Variance)>,
pub extends: Option<Type>,
pub implements: Vec<Type>,
pub throws: Vec<String>,
pub assertions: Vec<(String, Type)>,
pub assertions_if_true: Vec<(String, Type)>,
pub assertions_if_false: Vec<(String, Type)>,
pub suppressed_issues: Vec<String>,
pub is_deprecated: bool,
pub is_internal: bool,
pub is_pure: bool,
pub no_named_arguments: bool,
pub is_immutable: bool,
pub is_readonly: bool,
pub is_api: bool,
pub is_final: bool,
pub is_inherit_doc: bool,
pub description: String,
pub deprecated: Option<String>,
pub see: Vec<String>,
pub mixins: Vec<String>,
pub properties: Vec<DocProperty>,
pub methods: Vec<DocMethod>,
pub type_aliases: Vec<DocTypeAlias>,
pub import_types: Vec<DocImportType>,
pub require_extends: Vec<String>,
pub require_implements: Vec<String>,
pub since: Option<String>,
pub removed: Option<String>,
pub invalid_annotations: Vec<String>,
pub mir_checks: Vec<(String, String)>,
pub trace_vars: Vec<String>,
pub taint_sinks: Vec<(String, String)>,
pub seal_properties: bool,
pub if_this_is: Option<Type>,
}Fields§
§params: Vec<(String, Type)>@param Type $name
return_type: Option<Type>@return Type
var_type: Option<Type>@var Type or @var Type $name — type and optional variable name
var_name: Option<String>Optional variable name from @var Type $name
templates: Vec<(String, Option<Type>, Variance)>@template T / @template T of Bound / @template-covariant T / @template-contravariant T
extends: Option<Type>@extends ClassName<T>
implements: Vec<Type>@implements InterfaceName<T>
throws: Vec<String>@throws ClassName
assertions: Vec<(String, Type)>@psalm-assert Type $var
assertions_if_true: Vec<(String, Type)>@psalm-assert-if-true Type $var
assertions_if_false: Vec<(String, Type)>@psalm-assert-if-false Type $var
suppressed_issues: Vec<String>@psalm-suppress IssueName
is_deprecated: bool§is_internal: bool§is_pure: bool§no_named_arguments: bool§is_immutable: bool§is_readonly: bool§is_api: bool§is_final: bool@final — class should be treated as final even without the PHP final keyword.
is_inherit_doc: bool@inheritDoc or {@inheritDoc} was present — documentation should be
inherited from the nearest ancestor that has a real docblock.
description: StringFree text before first @ tag — used for hover display
deprecated: Option<String>@deprecated message — Some(message) or Some(“”) if no message
see: Vec<String>@see ClassName / @link URL
mixins: Vec<String>@mixin ClassName
properties: Vec<DocProperty>@property, @property-read, @property-write
methods: Vec<DocMethod>@method [static] ReturnType name([params])
type_aliases: Vec<DocTypeAlias>@psalm-type Alias = TypeExpr / @phpstan-type Alias = TypeExpr
import_types: Vec<DocImportType>@psalm-import-type Alias from SourceClass / @phpstan-import-type ...
require_extends: Vec<String>@psalm-require-extends ClassName / @phpstan-require-extends ClassName
require_implements: Vec<String>@psalm-require-implements InterfaceName / @phpstan-require-implements InterfaceName
since: Option<String>@since X.Y — first PHP version this symbol exists in.
removed: Option<String>@removed X.Y — first PHP version this symbol no longer exists in.
invalid_annotations: Vec<String>Malformed type annotations detected during parsing.
mir_checks: Vec<(String, String)>@mir-check $var is TYPE — (var_name_without_dollar, type_string)
trace_vars: Vec<String>@trace $var1, $var2 or @trace $var1 $var2 — variable names to trace
taint_sinks: Vec<(String, String)>@taint-sink <kind> $param — (param_name_without_dollar, sink_kind_string)
seal_properties: bool@seal-properties / @psalm-seal-properties — disallows undeclared property access.
if_this_is: Option<Type>@if-this-is Type / @psalm-if-this-is Type — the method may only be
called when $this satisfies this type. Stored as the raw parsed type;
class names are resolved later by the collector.
Implementations§
Source§impl ParsedDocblock
impl ParsedDocblock
Sourcepub fn get_param_type(&self, name: &str) -> Option<&Type>
pub fn get_param_type(&self, name: &str) -> Option<&Type>
Returns the type for a given parameter name (strips leading $).
Uses the last match so that @psalm-param / @phpstan-param (which
php-rs-parser maps to the same Param variant as @param) overrides a
preceding plain @param annotation.
Trait Implementations§
Source§impl Clone for ParsedDocblock
impl Clone for ParsedDocblock
Source§fn clone(&self) -> ParsedDocblock
fn clone(&self) -> ParsedDocblock
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParsedDocblock
impl Debug for ParsedDocblock
Source§impl Default for ParsedDocblock
impl Default for ParsedDocblock
Source§fn default() -> ParsedDocblock
fn default() -> ParsedDocblock
Auto Trait Implementations§
impl Freeze for ParsedDocblock
impl RefUnwindSafe for ParsedDocblock
impl Send for ParsedDocblock
impl Sync for ParsedDocblock
impl Unpin for ParsedDocblock
impl UnsafeUnpin for ParsedDocblock
impl UnwindSafe for ParsedDocblock
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more