Struct gtk4::TreePath[][src]

pub struct TreePath(_);
Expand description

An opaque structure representing a path to a row in a model.

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 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

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. It also returns the number of elements in the array. The array should not be freed.

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

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 !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. 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.