pub struct S7MethodAttrs {Show 13 fields
pub getter: bool,
pub setter: bool,
pub prop: Option<String>,
pub default: Option<String>,
pub validate: bool,
pub required: bool,
pub frozen: bool,
pub deprecated: Option<String>,
pub no_dots: bool,
pub dispatch: Option<String>,
pub fallback: bool,
pub convert_from: Option<String>,
pub convert_to: Option<String>,
}Expand description
S7-specific per-method markers, separated from MethodAttrs so the S7
class generator has a self-contained bag of its own state (property
getters/setters, generic-dispatch controls, convert() wiring) and the other
class generators don’t have to look past them.
§Mapping from s7(...) attribute keys
| Attribute | Field |
|---|---|
s7(getter) | getter: true |
s7(setter) | setter: true |
s7(prop = "name") | prop: Some("name") |
s7(default = "expr") | default: Some("expr") |
s7(validate) | validate: true |
s7(required) | required: true |
s7(frozen) | frozen: true |
s7(deprecated = "msg") | deprecated: Some("msg") |
s7(no_dots) | no_dots: true |
s7(dispatch = "x,y") | dispatch: Some("x,y") |
s7(fallback) | fallback: true |
s7(convert_from = "T") | convert_from: Some("T") |
s7(convert_to = "T") | convert_to: Some("T") |
Fields§
§getter: bool§setter: bool§prop: Option<String>§default: Option<String>§validate: bool§required: bool§frozen: bool§deprecated: Option<String>§no_dots: bool§dispatch: Option<String>§fallback: bool§convert_from: Option<String>§convert_to: Option<String>Trait Implementations§
Source§impl Debug for S7MethodAttrs
impl Debug for S7MethodAttrs
Source§impl Default for S7MethodAttrs
impl Default for S7MethodAttrs
Source§fn default() -> S7MethodAttrs
fn default() -> S7MethodAttrs
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for S7MethodAttrs
impl RefUnwindSafe for S7MethodAttrs
impl Send for S7MethodAttrs
impl Sync for S7MethodAttrs
impl Unpin for S7MethodAttrs
impl UnsafeUnpin for S7MethodAttrs
impl UnwindSafe for S7MethodAttrs
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
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)]const SIZE: usize = _
#[doc(hidden)]const SIZE: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGN: usize = _
#[doc(hidden)]const ALIGN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const ALIGNMENT: Alignment = _
#[doc(hidden)]const ALIGNMENT: Alignment = _
🔬This is a nightly-only experimental API. (
ptr_alignment_type)Source§#[doc(hidden)]const IS_ZST: bool = _
#[doc(hidden)]const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const LAYOUT: Layout = _
#[doc(hidden)]const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties)Source§#[doc(hidden)]const MAX_SLICE_LEN: usize = _
#[doc(hidden)]const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties)The largest safe length for a
[Self]. Read moreLayout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 152 bytes