Expand description
Built-in adapter traits for std library traits.
Provides RDebug, RDisplay, RHash, ROrd, RPartialOrd,
RError, RFromStr, RClone, RCopy, RDefault, RIterator,
RExtend, and RFromIter with blanket implementations where possible.
See module docs for usage.
Built-in adapter traits for common Rust standard library traits.
These traits provide blanket implementations that allow any Rust type implementing standard traits to be exposed to R without boilerplate.
§Example
ⓘ
use miniextendr_api::prelude::*;
use miniextendr_api::adapter_traits::RDebug;
#[derive(Debug, ExternalPtr)]
struct MyData {
values: Vec<i32>,
}
// RDebug is automatically available for any Debug type
#[miniextendr]
impl RDebug for MyData {}In R:
data <- MyData$new(...)
data$debug_str() # "MyData { values: [1, 2, 3] }"
data$debug_str_pretty() # Pretty-printed with newlinesStructs§
- RClone
View - Runtime view for objects implementing
RClone. Generated from source location line 368, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - RCopy
View - Runtime view for objects implementing
RCopy. Generated from source location line 454, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - RDebug
View - Runtime view for objects implementing
RDebug. Generated from source location line 55, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - RDefault
View - Runtime view for objects implementing
RDefault. Generated from source location line 407, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - RDisplay
View - Runtime view for objects implementing
RDisplay. Generated from source location line 97, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - RError
View - Runtime view for objects implementing
RError. Generated from source location line 264, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - RFrom
StrView - Runtime view for objects implementing
RFromStr. Generated from source location line 328, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - RHash
View - Runtime view for objects implementing
RHash. Generated from source location line 132, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - RIterator
View - Runtime view for objects implementing
RIterator. Generated from source location line 540, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - ROrd
View - Runtime view for objects implementing
ROrd. Generated from source location line 164, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - RPartial
OrdView - Runtime view for objects implementing
RPartialOrd. Generated from source location line 204, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs.
Constants§
- TAG_
RCLONE - Type tag for runtime identification of the
RClonetrait. Generated from source location line 368, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RCOPY - Type tag for runtime identification of the
RCopytrait. Generated from source location line 454, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RDEBUG - Type tag for runtime identification of the
RDebugtrait. Generated from source location line 55, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RDEFAULT - Type tag for runtime identification of the
RDefaulttrait. Generated from source location line 407, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RDISPLAY - Type tag for runtime identification of the
RDisplaytrait. Generated from source location line 97, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RERROR - Type tag for runtime identification of the
RErrortrait. Generated from source location line 264, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
REXTEND - Type tag for runtime identification of the
RExtendtrait. Generated from source location line 666, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RFROMITER - Type tag for runtime identification of the
RFromItertrait. Generated from source location line 733, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RFROMSTR - Type tag for runtime identification of the
RFromStrtrait. Generated from source location line 328, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RHASH - Type tag for runtime identification of the
RHashtrait. Generated from source location line 132, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RITERATOR - Type tag for runtime identification of the
RIteratortrait. Generated from source location line 540, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RMAKEITER - Type tag for runtime identification of the
RMakeItertrait. Generated from source location line 882, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RORD - Type tag for runtime identification of the
ROrdtrait. Generated from source location line 164, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RPARTIALORD - Type tag for runtime identification of the
RPartialOrdtrait. Generated from source location line 204, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - TAG_
RTOVEC - Type tag for runtime identification of the
RToVectrait. Generated from source location line 787, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs.
Traits§
- RClone
- Adapter trait for
std::clone::Clone. - RCopy
- Adapter trait for
std::marker::Copy. - RDebug
- Adapter trait for
std::fmt::Debug. - RDefault
- Adapter trait for
std::default::Default. - RDisplay
- Adapter trait for
std::fmt::Display. - RError
- Adapter trait for
std::error::Error. - RExtend
- Adapter trait for
std::iter::Extend. - RFrom
Iter - Adapter trait for
std::iter::FromIterator. - RFrom
Str - Adapter trait for
std::str::FromStr. - RHash
- Adapter trait for
std::hash::Hash. - RIterator
- Adapter trait for
std::iter::Iterator. - RMake
Iter - Adapter trait for creating iterator wrappers from collections.
- ROrd
- Adapter trait for
std::cmp::Ord. - RPartial
Ord - Adapter trait for
std::cmp::PartialOrd. - RToVec
- Adapter trait for collections that can be converted to vectors.
Functions§
- __
rclone_ build_ vtable - Build a vtable for a concrete type implementing
RClone. Generated from source location line 368, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - __
rcopy_ build_ vtable - Build a vtable for a concrete type implementing
RCopy. Generated from source location line 454, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - __
rdebug_ build_ vtable - Build a vtable for a concrete type implementing
RDebug. Generated from source location line 55, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - __
rdefault_ build_ vtable - Build a vtable for a concrete type implementing
RDefault. Generated from source location line 407, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - __
rdisplay_ build_ vtable - Build a vtable for a concrete type implementing
RDisplay. Generated from source location line 97, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - __
rerror_ build_ vtable - Build a vtable for a concrete type implementing
RError. Generated from source location line 264, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - __
rfromstr_ build_ vtable - Build a vtable for a concrete type implementing
RFromStr. Generated from source location line 328, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - __
rhash_ build_ vtable - Build a vtable for a concrete type implementing
RHash. Generated from source location line 132, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - __
riterator_ build_ vtable - Build a vtable for a concrete type implementing
RIterator. Generated from source location line 540, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - __
rord_ build_ vtable - Build a vtable for a concrete type implementing
ROrd. Generated from source location line 164, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs. - __
rpartialord_ build_ vtable - Build a vtable for a concrete type implementing
RPartialOrd. Generated from source location line 204, column 11. Generated from source fileminiextendr-api/src/adapter_traits.rs.