Struct lib_rapid::math::sets::Set[][src]

pub struct Set<'a, T> { /* fields omitted */ }

Implementations

Creates a new Set using a parent-Set to which it applies a closure.

Arguments
  • parent - The Set from which the new set emerges.
  • f - The closure after which the new set is created.
Returns

A child Set.

Does a mathematical union on two sets.

Arguments
  • self - The first set.
  • other - The second set.
Returns

A new set containing the union of both sets.

Does a mathematical intersection on two sets.

Arguments
  • self - The first set.
  • other - The second set.
Returns

A new set containing the intersection of both sets.

Lets you check for an element in a set.

Arguments
  • elem - The element to check for.
Returns

A boolean value which determines if the element is in the set.

Lets you check wether a set has a parent or not.

Returns

A boolean value which determines if the set has a value.

Lets you set the elements of a set.

Arguments
  • vals - The Vec to change the values to.
Returns

Nothing.

Lets you get the elements of a set.

Arguments
  • none
Returns

A &Vec<T> containing all elements.

Lets you print a set with all its parents recursively.

Returns

Nothing.

Converts a set with all subsets to a string.

Returns

A String containing the result.

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

Formats the value using the given formatter. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

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.