Function oc_wasm_safe::computer::pull_signal [−][src]
pub fn pull_signal(buffer: &mut [u8]) -> Result<Option<&mut [u8]>>
Expand description
Pops a signal from the signal queue.
The buffer
parameter identifies where to store the signal data.
If there is a signal pending, the signal data is written to buffer
as a CBOR-encoded sequence
containing the name followed by any additional signal parameters, a slice referring to it is
returned, and the signal is removed from the queue. If not, None
is returned.
Errors
BufferTooShort
is returned ifbuffer
is not large enough to hold the signal data.
On error, the signal remains in the queue.