Skip to main content

AltList

Trait AltList 

Source
pub trait AltList: AltVec {
    const HAS_SET_ELT: bool = false;

    // Required method
    fn elt(x: SEXP, i: R_xlen_t) -> SEXP;

    // Provided method
    fn set_elt(_x: SEXP, _i: R_xlen_t, _v: SEXP) { ... }
}
Expand description

List vector methods.

REQUIRED: elt must be implemented (no default). R will error with “must provide an Elt method” if you don’t provide it.

Provided Associated Constants§

Source

const HAS_SET_ELT: bool = false

Set to true to register set_elt.

Required Methods§

Source

fn elt(x: SEXP, i: R_xlen_t) -> SEXP

Get list element at index. Returns any SEXP. This is REQUIRED for ALTLIST - there is no default.

Provided Methods§

Source

fn set_elt(_x: SEXP, _i: R_xlen_t, _v: SEXP)

Set element (for mutable lists).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§