Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A reply for a script message received. If no reply has been sent by the user, an automatically generated reply with undefined value with be sent.
Since: 2.40
Synopsis
- newtype ScriptMessageReply = ScriptMessageReply (ManagedPtr ScriptMessageReply)
- scriptMessageReplyRef :: (HasCallStack, MonadIO m) => ScriptMessageReply -> m ScriptMessageReply
- scriptMessageReplyReturnErrorMessage :: (HasCallStack, MonadIO m) => ScriptMessageReply -> Text -> m ()
- scriptMessageReplyReturnValue :: (HasCallStack, MonadIO m, IsValue a) => ScriptMessageReply -> a -> m ()
- scriptMessageReplyUnref :: (HasCallStack, MonadIO m) => ScriptMessageReply -> m ()
Exported types
newtype ScriptMessageReply Source #
Memory-managed wrapper type.
ScriptMessageReply (ManagedPtr ScriptMessageReply) |
Instances
Methods
Click to display all available methods, including inherited ones
ref
scriptMessageReplyRef Source #
:: (HasCallStack, MonadIO m) | |
=> ScriptMessageReply |
|
-> m ScriptMessageReply | Returns: the |
Atomically increments the reference count of scriptMessageReply
by one.
Since: 2.40
returnErrorMessage
scriptMessageReplyReturnErrorMessage Source #
:: (HasCallStack, MonadIO m) | |
=> ScriptMessageReply |
|
-> Text |
|
-> m () |
Reply to a script message with an error message.
Since: 2.40
returnValue
scriptMessageReplyReturnValue Source #
:: (HasCallStack, MonadIO m, IsValue a) | |
=> ScriptMessageReply |
|
-> a |
|
-> m () |
Reply to a script message with a value.
This function can be called twice for passing the reply value in.
Since: 2.40
unref
scriptMessageReplyUnref Source #
:: (HasCallStack, MonadIO m) | |
=> ScriptMessageReply |
|
-> m () |
Atomically decrements the reference count of scriptMessageReply
by one.
If the reference count drops to 0, all the memory allocated by the
ScriptMessageReply
is released. This function is MT-safe and may
be called from any thread.
Since: 2.40