TT_MESSAGE_PATTERN(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸ’… tt_message_pattern β€” bestie edition

okay so this is the tt_message_pattern page, straight out of the ToolTalk <purple>library call</purple> section β€” yes the same one, I just folded the label in up here so it doesn't get lonely πŸŽ€


✨ NAME ✨

tt_message_pattern β€” returns the pattern that a message matched πŸ’«


🌸 SYNOPSIS 🌸

#include <Tt/tt_c.h>
Tt_pattern tt_message_pattern(
Tt_message m);

πŸ¦‹ DESCRIPTION πŸ¦‹

So tt_message_pattern gives you back the pattern that the specified message matched. that's it, that's the whole vibe. it's giving "which filter did I fall through" energy πŸ‘‘

The m argument is the opaque handle for the message involved in this operation. opaque meaning don't peek inside it, just hand it over and let the library do its thing πŸ™ˆ


πŸ”₯ RETURN VALUE πŸ”₯

If everything slays, tt_message_pattern returns the opaque handle for a message pattern ✨ You can run tt_ptr_error(3) on it to check whether that handle is actually valid β€” highly recommend, no cap.

Otherwise it returns one of these Tt_status values:

  • TT_OK β€” the operation completed successfully. we love a happy ending πŸŽ‰
  • TT_ERR_NOMP β€” the ttsession(1) process is not running, and the ToolTalk service cannot restart it 😭 this is the "nobody's home and we can't get back in" situation.
  • TT_ERR_POINTER β€” the pointer you passed does not point to an object of the correct type for this operation πŸ’€ check your types, bestie.

🧚 APPLICATION USAGE 🧚

The application should use tt_free(3) to free any data stored in the address returned by the ToolTalk API 🫢 like, you don't just leave it lying around, that's rude to your memory.


🌈 SEE ALSO 🌈

periodt πŸ’œ


okay that's the whole page, go be iconic with your patterns ✨

signing off from the tt_message_pattern(library call) corner of the ToolTalk library docs β€” same source, same version, same date as ever, mwah πŸ’‹

πŸ“¦ where this page comes from