#[repr(transparent)]
pub struct TreePath { /* private fields */ }

Implementations

Creates a new TreePath-struct. This refers to a row.

Returns

A newly created TreePath-struct.

Creates a new TreePath-struct.

The string representation of this path is “0”.

Returns

A new TreePath-struct

Creates a new path with the given indices array of length.

indices

array of indices

Returns

A newly created TreePath-struct

Creates a new TreePath-struct initialized to path.

path is expected to be a colon separated list of numbers. For example, the string “10:4:0” would create a path of depth 3 pointing to the 11th child of the root node, the 5th child of that 11th child, and the 1st child of that 5th child. If an invalid path string is passed in, None is returned.

path

The string representation of a path

Returns

A newly-created TreePath-struct, or None

Appends a new index to a path.

As a result, the depth of the path is increased.

index_

the index

Moves self to point to the first child of the current path.

Returns the current depth of self.

Returns

The depth of self

Returns the current indices of self.

This is an array of integers, each representing a node in a tree. It also returns the number of elements in the array. The array should not be freed.

Returns

The current indices, or None

Returns true if descendant is a descendant of self.

descendant

another TreePath-struct

Returns

true if descendant is contained inside self

Returns true if self is a descendant of ancestor.

ancestor

another TreePath-struct

Returns

true if ancestor contains self somewhere below it

Moves the self to point to the next node at the current depth.

Prepends a new index to a path.

As a result, the depth of the path is increased.

index_

the index

Moves the self to point to the previous node at the current depth, if it exists.

Returns

true if self has a previous node, and the move was made

Generates a string representation of the path.

This string is a “:” separated list of numbers. For example, “4:10:0:3” would be an acceptable return value for this string.

Returns

A newly-allocated string. Must be freed with g_free().

Moves the self to point to its parent node, if it has a parent.

Returns

true if self has a parent, and the move was made

Returns the current indices of self.

This is an array of integers, each representing a node in a tree. This value should not be freed.

The length of the array can be obtained with depth().

Returns

The current indices, or None

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Returns the type identifier of Self.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Ensures that the type has been registered with the type system.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.