Vtc.Source.Seconds protocol (vtc v0.1.8) View Source

Protocol which types can implement to be passed as the main value of Vtc.Timecode.with_seconds/2.

Implementations

Out of the box, this protocol is implemented for the following types:

Link to this section Summary

Functions

Returns the value as a rational seconds value.

Link to this section Types

Link to this section Functions

Specs

Returns the value as a rational seconds value.

Arguments

  • value: The source value.

  • rate: The framerate of the timecode being parsed.

Returns

A result tuple with a rational representation of the seconds value using Ratio on success.