pub enum ZapParam {
String(String),
ReadOnlyU8Buffer(Arc<Vec<u8>>),
ReadOnlyU32Buffer(Arc<Vec<u32>>),
ReadOnlyF32Buffer(Arc<Vec<f32>>),
MutableU8Buffer(Vec<u8>),
MutableF32Buffer(Vec<f32>),
MutableU32Buffer(Vec<u32>),
}Variants
String(String)
An arbitrary string supplied by the user (e.g. JSON encoded). TODO(Paras): I wish I could just put references here, since we end up cloning the string anyways when calling zerde. But then we have to declare many lifetimes - maybe worth it.
ReadOnlyU8Buffer(Arc<Vec<u8>>)
Buffers to pass read-only memory from JS to Rust
ReadOnlyU32Buffer(Arc<Vec<u32>>)
ReadOnlyF32Buffer(Arc<Vec<f32>>)
MutableU8Buffer(Vec<u8>)
Buffers to transfer ownership of memory from JS to Rust
MutableF32Buffer(Vec<f32>)
MutableU32Buffer(Vec<u32>)
Implementations
Borrow contents of ZapParam::MutableU8Buffer or ZapParam::ReadOnlyU8Buffer as &[u8].
Borrow contents of ZapParam::MutableU32Buffer or ZapParam::ReadOnlyU32Buffer as &[u32].
Borrow contents of ZapParam::MutableF32Buffer or ZapParam::ReadOnlyF32Buffer as &[f32].
Get contents of ZapParam::ReadOnlyU8Buffer, without having to consume it.
Get contents of ZapParam::ReadOnlyU32Buffer, without having to consume it.
Get contents of ZapParam::ReadOnlyF32Buffer, without having to consume it.
Get contents of ZapParam::String, consuming it.
Get contents of ZapParam::MutableU8Buffer, consuming it.
Get contents of ZapParam::MutableU32Buffer, consuming it.
Get contents of ZapParam::MutableF32Buffer, consuming it.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ZapParam
impl UnwindSafe for ZapParam
Blanket Implementations
Mutably borrows from an owned value. Read more