Type Alias xrust::item::Sequence

source ·
pub type Sequence<N> = Vec<Rc<Item<N>>>;
Expand description

In XPath, the Sequence is the fundamental data structure. It is an ordered collection of Items. The Rust impementation is a Vector of reference counted Items.

See SequenceTrait for methods.

Aliased Type§

struct Sequence<N> { /* private fields */ }

Trait Implementations§

source§

impl<N: Node> From<Item<N>> for Sequence<N>

source§

fn from(i: Item<N>) -> Self

Converts to this type from the input type.
source§

impl<N: Node> From<Value> for Sequence<N>

source§

fn from(v: Value) -> Self

Converts to this type from the input type.
source§

impl<N: Node> SequenceTrait<N> for Sequence<N>

source§

fn to_string(&self) -> String

Returns the string value of the Sequence.

source§

fn to_xml(&self) -> String

Renders the Sequence as XML

source§

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

Renders the Sequence as XML

source§

fn to_json(&self) -> String

Renders the Sequence as JSON

source§

fn push_node(&mut self, n: N)

Push a document’s Node on to the Sequence

source§

fn push_value(&mut self, v: Value)

Push a Value on to the Sequence

source§

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

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

source§

fn to_bool(&self) -> bool

Calculate the effective boolean value of the Sequence

source§

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

Convenience routine for integer value of the Sequence. The Sequence must be a singleton; i.e. be a single item.