Skip to main content

Helpers

Struct Helpers 

Source
struct Helpers {
    fields: String,
    get: String,
    set: String,
    no_field: String,
    read_only: String,
    error_class: String,
    every_read: String,
    live: String,
    fallback: Option<String>,
    fallback_names: Option<String>,
}
Expand description

The names of the type’s field helpers.

Fields§

§fields: String§get: String§set: String§no_field: String§read_only: String

The miniextendr_read_only_field refusal (#2268), which the writers of r_data_accessors = "read_only" call for every field.

§error_class: String

The classes in front of the methods’ own errors (#1899), NULL without field_error(...).

§every_read: String

TRUE under restored(refuse = "every_read") (#1901): it gates the calls of live.

§live: String

The liveness check of restored(refuse = "every_read") (#1901), a stub that is never called without it.

§fallback: Option<String>

The .Call entry of the impl’s fallback = "..." (#2150), for a name no field has (fallback_c_entries).

§fallback_names: Option<String>

The .Call entry of its fallback_names = "...", for .DollarNames().

Implementations§

Source§

impl Helpers

Source

fn new(parsed_impl: &ParsedImpl) -> Self

Source

fn fallback_read(&self, receiver: &str, name: &str, indent: &str) -> Vec<String>

The fallback’s read of name, a name no field has, on the bare pointer receiver (#2150): the method returns the value the fallback has for it. The method passes its own frame (environment()) as the value of None, which the entry hands back untouched, so no value the fallback computes can be taken for it; the lines after these decide what None reads. Nothing without a fallback.

Source

fn field_write( &self, parsed_impl: &ParsedImpl, receiver: &str, name: &str, ) -> Vec<String>

The last lines of a $<- / [[<- once name is known to be a field: under r_data_accessors the write through .rdata_set_<Type> on receiver, checked, and the object x; under r_data_accessors = "read_only" the miniextendr_read_only_field refusal (#2268), on the method’s call, naming the R class of x.

Source

fn fallback_names_call(&self, receiver: &str) -> Option<String>

The call of the impl’s fallback_names entry (#2150) on the bare pointer receiver, for .DollarNames(); None without one. The entry gives character(0) for a pointer without its Rust value, so completion still never raises on a restored object.

Source

fn dollar_names_with_fallback(value: &str, known: &str) -> Vec<String>

The last lines of a .DollarNames() with a fallback_names (#2150): value, which reads the fallback’s names (or a list’s own), bound to .val and checked, then pattern over known and .val, each name once (a name the fallback shares with a field reads the field).

Source

fn live_check(&self, receiver: &str, indent: &str) -> Vec<String>

Under restored(refuse = "every_read") (#1901), the check a read that reaches no accessor makes first on the bare pointer receiver: a pointer without its Rust value raises the type’s restored error. A type without the option skips it (its flag is FALSE).

Source

fn every_read_check(&self) -> Vec<String>

The first check of every S3 reader under restored(refuse = "every_read") (#1901, #1919), on a bare pointer and on a list or environment receiver: a pointer without its Rust value, a .ptr that is one, and a list or environment that carries none (the shape an earlier release may have saved) raise the type’s refusal before the index is looked at, so a position or an unknown name is refused too. An atomic receiver was never saved; its field reads refuse it.

Source

fn dollar_names_guard(&self) -> String

The guard of the S3 .DollarNames(), which reads a list’s or environment’s own names(): under restored(refuse = "every_read") a receiver without a live Rust value (#1901), a restored pointer or a list or environment carrying one or none (#1919), completes to the field names, which need no value (#2218), since its names() would refuse. A serde type’s restored pointer gets its value back in the check first (#2186). .DollarNames() serves completion, so it never raises. The S4 and env completions read only static names and the fallback’s, whose entry gives none without a value, so they need no guard.

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> SizeHint for T
where T: ?Sized,

Source§

default fn lower_bound(&self) -> usize

🔬This is a nightly-only experimental API. (core_io_internals)
Returns a lower bound on the number of elements this container-like item contains. For example, an array [u8; 12] could return any value between 0 and 12 inclusively as a correct implementation. Read more
Source§

default fn upper_bound(&self) -> Option<usize>

🔬This is a nightly-only experimental API. (core_io_internals)
Returns an upper bound on the number of elements this container-like item contains if it can be determined, otherwise None. Read more
Source§

final fn size_hint(&self) -> (usize, Option<usize>)

🔬This is a nightly-only experimental API. (core_io_internals)
Returns an estimate for the number of elements this container like type contains. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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: 240 bytes