pub struct BridgeableArgs {
pub derives_to_pass: Vec<Ident>,
pub compares_to_add: Vec<Ident>,
pub doc_rec: DocRec,
}Expand description
Parsed arguments for the #[bridgeable(...)] attribute macro.
Supports the following syntax:
#[bridgeable] // defaults
#[bridgeable(Document)] // enable Documented impl
#[bridgeable(derive(Debug, PartialEq))] // forward derives
#[bridgeable(derive(Debug, PartialEq), Document)] // bothderive(...)— derives to forward to the archived type (whitelisted to Debug, PartialEq, Eq, PartialOrd, Ord). PartialEq and PartialOrd also generate#[rkyv(compare(...))]attributes.Document— opt-in flag that generates aDocumentedimpl producing a JSON type spec for FFI/RPC consumers.
Fields§
§derives_to_pass: Vec<Ident>Whitelisted derives to pass through to the rkyv Archived type.
compares_to_add: Vec<Ident>Comparison traits (PartialEq / PartialOrd) found in the derives —
these also become #[rkyv(compare(...))] entries.
doc_rec: DocRecImplementations§
Source§impl BridgeableArgs
impl BridgeableArgs
Sourcepub fn from_metas(metas: Punctuated<Meta, Comma>) -> Result<Self>
pub fn from_metas(metas: Punctuated<Meta, Comma>) -> Result<Self>
Build from an already-parsed Punctuated<Meta, Comma> list.
This is the shared logic used by both Parse and a direct call site.
Trait Implementations§
Source§impl Parse for BridgeableArgs
Allows parse_macro_input!(args as BridgeableArgs) in proc-macro crates.
impl Parse for BridgeableArgs
Allows parse_macro_input!(args as BridgeableArgs) in proc-macro crates.
fn parse(input: ParseStream<'_>) -> Result<Self>
Auto Trait Implementations§
impl !Send for BridgeableArgs
impl !Sync for BridgeableArgs
impl Freeze for BridgeableArgs
impl RefUnwindSafe for BridgeableArgs
impl Unpin for BridgeableArgs
impl UnsafeUnpin for BridgeableArgs
impl UnwindSafe for BridgeableArgs
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