pub struct Assertion {
pub kind: AssertionKind,
pub param: Arc<str>,
pub ty: Type,
pub negated: bool,
pub param_key: Option<ArrayKey>,
}Fields§
§kind: AssertionKind§param: Arc<str>§ty: Type§negated: boolTrue for the !Type negated form (@psalm-assert !null $x): the
parameter is asserted to NOT be ty, rather than to BE it.
param_key: Option<ArrayKey>Set for an assertion targeting a specific array key of param
rather than the whole parameter (@psalm-assert-if-true string $arr['key'] — param is "arr", param_key is Some(String("key"))).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Assertion
impl<'de> Deserialize<'de> for Assertion
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Assertion
Auto Trait Implementations§
impl Freeze for Assertion
impl RefUnwindSafe for Assertion
impl Send for Assertion
impl Sync for Assertion
impl Unpin for Assertion
impl UnsafeUnpin for Assertion
impl UnwindSafe for Assertion
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