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.
- Stream
Option - Alias for an sdk StreamOption.