Struct indradb::Weight [] [src]

pub struct Weight(pub f32);

An edge weight.

Edge weights must be between -1.0 and 1.0.

Methods

impl Weight
[src]

[src]

Constructs a new edge weight.

Arguments

  • weight - The weight, between -1.0 and 1.0.

Errors

Returns a ValidationError if the weight is below -1.0 or above 1.0.

Trait Implementations

impl Clone for Weight
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Weight
[src]

[src]

Formats the value using the given formatter.

impl Copy for Weight
[src]