Skip to main content

S7MethodAttrs

Struct S7MethodAttrs 

Source
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

AttributeField
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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for S7MethodAttrs

Source§

fn default() -> S7MethodAttrs

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> SizedTypeProperties for T

Source§

#[doc(hidden)]
const SIZE: usize = _

🔬This is a nightly-only experimental API. (sized_type_properties)
Source§

#[doc(hidden)]
const ALIGN: usize = _

🔬This is a nightly-only experimental API. (sized_type_properties)
Source§

#[doc(hidden)]
const ALIGNMENT: Alignment = _

🔬This is a nightly-only experimental API. (ptr_alignment_type)
Source§

#[doc(hidden)]
const IS_ZST: bool = _

🔬This is a nightly-only experimental API. (sized_type_properties)
true if this type requires no storage. false if its size is greater than zero. Read more
Source§

#[doc(hidden)]
const LAYOUT: Layout = _

🔬This is a nightly-only experimental API. (sized_type_properties)
Source§

#[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 more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

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