Skip to main content

SequenceTrait

Trait SequenceTrait 

Source
pub trait SequenceTrait<N: Node> {
    // Required methods
    fn to_string(&self) -> String;
    fn to_xml(&self) -> String;
    fn to_xml_with_options(&self, od: &OutputDefinition) -> String;
    fn to_json(&self) -> String;
    fn to_bool(&self) -> bool;
    fn to_int(&self) -> Result<i64, Error>;
    fn push_node(&mut self, n: &N);
    fn push_value(&mut self, v: &Rc<Value>);
    fn push_item(&mut self, i: &Item<N>);
}

Required Methods§

Source

fn to_string(&self) -> String

Return the string value of the Sequence.

Source

fn to_xml(&self) -> String

Return a XML formatted representation of the Sequence.

Source

fn to_xml_with_options(&self, od: &OutputDefinition) -> String

Return a XML formatted representation of the Sequence, controlled by the supplied output definition.

Source

fn to_json(&self) -> String

Return a JSON formatted representation of the Sequence.

Source

fn to_bool(&self) -> bool

Return the Effective Boolean Value of the Sequence.

Source

fn to_int(&self) -> Result<i64, Error>

Convert the Sequence to an integer. The Sequence must be a singleton value.

Source

fn push_node(&mut self, n: &N)

Push an Node to the Sequence

Source

fn push_value(&mut self, v: &Rc<Value>)

Push a Value to the Sequence

Source

fn push_item(&mut self, i: &Item<N>)

Push an Item to the Sequence. This clones the item.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§