Crate lens_sdk

Source
Expand description

This crate contains members to aid in the construction of a Rust Lens Module.

To get started, see define.

Modules§

error
Error types returned by lens_sdk.
option
Option type returned by lens_sdk.
result
Result type alias returned by lens_sdk.

Macros§

define
Define the boilerplate for the Lens.
define_alloc
Define the mandatory alloc function for this Lens.
define_inverse
Define the optional inverse function for this Lens.
define_next
Define the mandatory next function for this Lens.
define_set_param
Define the optional set_param function for this Lens.
define_transform
Define the mandatory transform function for this Lens.

Constants§

EOS_TYPE_ID
A type id that donates the end of stream.
ERROR_TYPE_ID
A type id that denotes a simple string-based error.
JSON_TYPE_ID
A type id that denotes a json value.
NIL_TYPE_ID
A type id that denotes a nil value.

Functions§

alloc
Allocate the given size number of bytes in memory and returns a pointer to the first byte.
free
Manually drop the memory of the given size at the given location.
free_transport_buffer
Manually drop the memory occupied by a transport buffer at the given location.
next
Execute the given transform once, returning a pointer to the (serialized for transport) output.
nil_ptr
Returns a nil pointer.
to_mem
Write the given message bytes to memory, returning a pointer to the first byte.
try_from_mem
Read the data held at the given location in memory as the given TOutput type.
try_to_mem
Write the given message bytes to memory, returning a pointer to the first byte.

Type Aliases§

Error
Alias for an sdk Error.
Result
Alias for an sdk Result.
StreamOption
Alias for an sdk StreamOption.