Struct pendulum::HashedWheelBuilder [] [src]

pub struct HashedWheelBuilder { /* fields omitted */ }

Builder for configuring different options for a HashedWheel.

Methods

impl HashedWheelBuilder
[src]

[src]

Sets the tick duration which sets the resolution for the timer.

Any timeouts will be rounded up based on the tick duration.

[src]

Sets the number of slots used for ticks.

Controls how many slots we have for timeouts. The less number of collisions there are (where a collision is when two or more items in the same slot have different timeouts), the more efficient operations we can perform.

[src]

Sets the initial capacity for timer storage.

This is the number of timeouts we can initially store.

[src]

Sets the maximum capacity for timer storage.

This is the maximum number of timeouts we can ever store.

[src]

Sets the maximum timeout for any timer.

Defaults to tick_duration * num_slots.

[src]

Get the tick duration that was set.

[src]

Get the number of slots that were set.

[src]

Get the initial capacity for timer storage that was set.

[src]

Get the maximum capacity for timer storage that was set.

[src]

Get the maximum timeout that was set.

[src]

Build a new HashedWheel from the current builder.

Trait Implementations

impl Default for HashedWheelBuilder
[src]

[src]

Returns the "default value" for a type. Read more