pub struct PropertyDef {
pub name: Arc<str>,
pub ty: Option<Arc<Type>>,
pub inferred_ty: Option<Arc<Type>>,
pub visibility: Visibility,
pub is_static: bool,
pub is_readonly: bool,
pub default: Option<Arc<Type>>,
pub location: Option<Location>,
pub deprecated: Option<Arc<str>>,
}Fields§
§name: Arc<str>§ty: Option<Arc<Type>>Declared/inferred/default types. Stored as Option<Arc<Type>> (8 B)
rather than inline Option<Type> (176 B, no niche) and interned via the
global pool on construction/deserialization — common property types
(string, int, a shared class type) dedup to one allocation. Mirrors
FnParam::ty. On-disk format is unchanged (the serde helpers (de)serialize
the inner Type transparently).
inferred_ty: Option<Arc<Type>>§visibility: Visibility§is_static: bool§is_readonly: bool§default: Option<Arc<Type>>§location: Option<Location>§deprecated: Option<Arc<str>>@deprecated docblock annotation, if present.
Trait Implementations§
Source§impl Clone for PropertyDef
impl Clone for PropertyDef
Source§fn clone(&self) -> PropertyDef
fn clone(&self) -> PropertyDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PropertyDef
impl Debug for PropertyDef
Source§impl<'de> Deserialize<'de> for PropertyDef
impl<'de> Deserialize<'de> for PropertyDef
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
Source§impl PartialEq for PropertyDef
impl PartialEq for PropertyDef
Source§fn eq(&self, other: &PropertyDef) -> bool
fn eq(&self, other: &PropertyDef) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PropertyDef
impl Serialize for PropertyDef
impl StructuralPartialEq for PropertyDef
Auto Trait Implementations§
impl Freeze for PropertyDef
impl RefUnwindSafe for PropertyDef
impl Send for PropertyDef
impl Sync for PropertyDef
impl Unpin for PropertyDef
impl UnsafeUnpin for PropertyDef
impl UnwindSafe for PropertyDef
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