# SankeyLink

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls-livecharts/struct-sankeylink/

**struct** · [`ferroui-controls-livecharts`](/docs/0.5.0/api/ferroui-controls-livecharts/) · v0.5.0

```rust
struct SankeyLink
```

A directed weighted edge of a Sankey series (`SankeyLink`) between two node objects and, in
place of the source's `LinkColorMapper`, an optional colour of its own. A link without both
ends, or with an end that is not a node of the series, is skipped by the layout.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L84)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`with_nodes`](#function-with_nodes)
- [`entity_id`](#function-entity_id)
- [`snapshot`](#function-snapshot)
- [`source`](#function-source)
- [`set_source`](#function-set_source)
- [`target`](#function-target)
- [`set_target`](#function-set_target)
- [`weight`](#function-weight)
- [`set_weight`](#function-set_weight)
- [`color`](#function-color)
- [`set_color`](#function-set_color)
- [`source_property`](#function-source_property)
- [`target_property`](#function-target_property)
- [`weight_property`](#function-weight_property)
- [`color_property`](#function-color_property)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L88)

<a id="function-to_ref"></a>

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<SankeyLink>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L88)

<a id="function-construct"></a>

### construct

```rust
fn construct() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L94)

<a id="function-new"></a>

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L100)

<a id="function-with_nodes"></a>

### with_nodes

```rust
fn with_nodes(source: &Ref<SankeyNode>, target: &Ref<SankeyNode>, weight: f64) -> Ref<Self>
```

A link of the given weight from `source` to `target` (`SankeyLink(source, target, weight)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L104)

<a id="function-entity_id"></a>

### entity_id

```rust
fn entity_id(self: &Self) -> u64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L115)

<a id="function-snapshot"></a>

### snapshot

```rust
fn snapshot(self: &Self) -> ferroui_livecharts::SankeyLink
```

The engine link. A missing end takes the identity 0, which no node has.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L119)

<a id="function-source"></a>

### source

```rust
fn source(self: &Self) -> Option<Ref<SankeyNode>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L127)

<a id="function-set_source"></a>

### set_source

```rust
fn set_source(self: &Self, value: Option<Ref<SankeyNode>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L130)

<a id="function-target"></a>

### target

```rust
fn target(self: &Self) -> Option<Ref<SankeyNode>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L133)

<a id="function-set_target"></a>

### set_target

```rust
fn set_target(self: &Self, value: Option<Ref<SankeyNode>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L136)

<a id="function-weight"></a>

### weight

```rust
fn weight(self: &Self) -> f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L139)

<a id="function-set_weight"></a>

### set_weight

```rust
fn set_weight(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L142)

<a id="function-color"></a>

### color

```rust
fn color(self: &Self) -> Option<Color>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L145)

<a id="function-set_color"></a>

### set_color

```rust
fn set_color(self: &Self, value: Option<Color>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L148)

<a id="function-source_property"></a>

### source_property

```rust
fn source_property() -> &'static StyledProperty<Option<Ref<SankeyNode>>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L152)

<a id="function-target_property"></a>

### target_property

```rust
fn target_property() -> &'static StyledProperty<Option<Ref<SankeyNode>>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L152)

<a id="function-weight_property"></a>

### weight_property

```rust
fn weight_property() -> &'static StyledProperty<f64>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L152)

<a id="function-color_property"></a>

### color_property

```rust
fn color_property() -> &'static StyledProperty<Option<Color>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.LiveCharts/node_models.rs#L152)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<SankeyLink>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
