Skip to main content

DefaultPineOutput

Struct DefaultPineOutput 

Source
pub struct DefaultPineOutput { /* private fields */ }
Expand description

Default implementation of PineOutput that supports all features

Trait Implementations§

Source§

impl AlertConditionOutput for DefaultPineOutput

Source§

fn add_alertcondition(&mut self, alert: AlertCondition)

Record a declared alert condition.
Source§

fn alertconditions(&self) -> &[AlertCondition]

Every alert condition declared so far, in declaration order.
Source§

impl BoxOutput for DefaultPineOutput

Source§

fn add_box(&mut self, box_obj: PineBox) -> usize

Add a box and return its ID
Source§

fn get_box(&self, id: usize) -> Option<&PineBox>

Get a reference to a box by ID
Source§

fn get_box_mut(&mut self, id: usize) -> Option<&mut PineBox>

Get a mutable reference to a box by ID
Source§

fn delete_box(&mut self, id: usize) -> bool

Delete a box by ID and return true if it existed
Source§

impl Clone for DefaultPineOutput

Source§

fn clone(&self) -> DefaultPineOutput

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DefaultPineOutput

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DefaultPineOutput

Source§

fn default() -> DefaultPineOutput

Returns the “default value” for a type. Read more
Source§

impl FillOutput for DefaultPineOutput

Source§

fn add_fill(&mut self, fill: FillObject)

Source§

fn fills(&self) -> &[FillObject]

Source§

impl GlobalOutput for DefaultPineOutput

Source§

fn set_bgcolor(&mut self, color: Option<Color>)

Source§

fn set_barcolor(&mut self, color: Option<Color>)

Source§

fn global_context(&self) -> &GlobalContext

The accumulated chart-wide settings.
Source§

impl IndicatorOutput for DefaultPineOutput

Source§

fn set_indicator(&mut self, indicator: Indicator)

Record the indicator declaration (a script has at most one).
Source§

fn indicator(&self) -> Option<&Indicator>

The declaration, if the script declared one.
Source§

impl InputOutput for DefaultPineOutput

Source§

fn add_input(&mut self, input: Input)

Record a declared input.
Source§

fn inputs(&self) -> &[Input]

Every input declared so far, in declaration order.
Source§

impl LabelOutput for DefaultPineOutput

Source§

fn add_label(&mut self, label: Label) -> usize

Add a label and return its ID
Source§

fn get_label(&self, id: usize) -> Option<&Label>

Get a reference to a label by ID
Source§

fn get_label_mut(&mut self, id: usize) -> Option<&mut Label>

Get a mutable reference to a label by ID
Source§

fn delete_label(&mut self, id: usize) -> bool

Delete a label by ID and return true if it existed
Source§

impl LineOutput for DefaultPineOutput

Source§

fn add_line(&mut self, line: LineObject) -> usize

Add a line and return its ID
Source§

fn get_line(&self, id: usize) -> Option<&LineObject>

Get a reference to a line by ID
Source§

fn get_line_mut(&mut self, id: usize) -> Option<&mut LineObject>

Get a mutable reference to a line by ID
Source§

fn delete_line(&mut self, id: usize) -> bool

Delete a line by ID and return true if it existed
Source§

impl LogOutput for DefaultPineOutput

Source§

fn add_log(&mut self, level: LogLevel, message: String)

Add a log entry with the given level and message
Source§

fn get_logs(&self) -> &[LogEntry]

Get all log entries
Source§

impl PineOutput for DefaultPineOutput

Source§

fn clear(&mut self)

Clear all output data for a new iteration
Source§

impl PlotOutput for DefaultPineOutput

Source§

fn add_plot(&mut self, plot: Plot)

Add a plot output
Source§

fn plots(&self) -> &[Plot]

Get all plot outputs
Source§

fn add_plotarrow(&mut self, arrow: Plotarrow)

Add a plotarrow output
Source§

fn plotarrows(&self) -> &[Plotarrow]

Get all plotarrow outputs
Source§

fn add_plotbar(&mut self, bar: Plotbar)

Add a plotbar output
Source§

fn plotbars(&self) -> &[Plotbar]

Get all plotbar outputs
Source§

fn add_plotcandle(&mut self, candle: Plotcandle)

Add a plotcandle output
Source§

fn plotcandles(&self) -> &[Plotcandle]

Get all plotcandle outputs
Source§

fn add_plotchar(&mut self, char: Plotchar)

Add a plotchar output
Source§

fn plotchars(&self) -> &[Plotchar]

Get all plotchar outputs
Source§

fn add_plotshape(&mut self, shape: Plotshape)

Add a plotshape output
Source§

fn plotshapes(&self) -> &[Plotshape]

Get all plotshape outputs
Source§

impl TableOutput for DefaultPineOutput

Source§

fn add_table(&mut self, table: Table) -> usize

Add a table and return its ID
Source§

fn get_table(&self, id: usize) -> Option<&Table>

Get a reference to a table by ID
Source§

fn get_table_mut(&mut self, id: usize) -> Option<&mut Table>

Get a mutable reference to a table by ID
Source§

fn delete_table(&mut self, id: usize) -> bool

Delete a table by ID and return true if it existed

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.