gi-dazzle-1.0.1: libdazzle bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Dazzle.Structs.Trie

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Trie Source #

Memory-managed wrapper type.

Constructors

Trie (ManagedPtr Trie) 

Instances

Instances details
Eq Trie Source # 
Instance details

Defined in GI.Dazzle.Structs.Trie

Methods

(==) :: Trie -> Trie -> Bool #

(/=) :: Trie -> Trie -> Bool #

GBoxed Trie Source # 
Instance details

Defined in GI.Dazzle.Structs.Trie

ManagedPtrNewtype Trie Source # 
Instance details

Defined in GI.Dazzle.Structs.Trie

Methods

toManagedPtr :: Trie -> ManagedPtr Trie

TypedObject Trie Source # 
Instance details

Defined in GI.Dazzle.Structs.Trie

Methods

glibType :: IO GType

HasParentTypes Trie Source # 
Instance details

Defined in GI.Dazzle.Structs.Trie

IsGValue (Maybe Trie) Source #

Convert Trie to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Dazzle.Structs.Trie

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Trie -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Trie)

type ParentTypes Trie Source # 
Instance details

Defined in GI.Dazzle.Structs.Trie

type ParentTypes Trie = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

destroy, insert, lookup, ref, remove, traverse, unref.

Getters

None.

Setters

None.

destroy

trieDestroy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Trie

trie: A Trie or Nothing.

-> m () 

This is an alias for trieUnref.

insert

trieInsert Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Trie

trie: A Trie.

-> Text

key: The key to insert.

-> Ptr ()

value: The value to insert.

-> m () 

Inserts value into trie located with key.

lookup

trieLookup Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Trie

trie: A Trie.

-> Text

key: The key to lookup.

-> m (Ptr ())

Returns: The value inserted or Nothing.

Looks up key in trie and returns the value associated.

new

trieNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> DestroyNotify

valueDestroy: A DestroyNotify, or Nothing.

-> m Trie

Returns: A newly allocated Trie that should be freed with trieUnref.

Creates a new Trie. When a value is removed from the trie, valueDestroy will be called to allow you to release any resources.

ref

trieRef :: (HasCallStack, MonadIO m) => Trie -> m Trie Source #

No description available in the introspection data.

remove

trieRemove Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Trie

trie: A Trie.

-> Text

key: The key to remove.

-> m Bool

Returns: True if key was found, otherwise False.

Removes key from trie, possibly destroying the value associated with the key.

traverse

trieTraverse Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Trie

trie: A Trie.

-> Text

key: The key to start traversal from.

-> TraverseType

order: The order to traverse.

-> [TraverseFlags]

flags: The flags for which nodes to callback.

-> Int32

maxDepth: the maximum depth to process.

-> TrieTraverseFunc

func: The func to execute for each matching node.

-> m () 

Traverses all nodes of trie according to the parameters. For each node matching the traversal parameters, func will be executed.

Only TraverseTypePreOrder and TraverseTypePostOrder are supported for order.

If maxDepth is less than zero, the entire tree will be traversed. If max_depth is 1, then only the root will be traversed.

unref

trieUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Trie

trie: A Trie or Nothing.

-> m () 

Drops the reference count by one on trie. When it reaches zero, the structure is freed.