Skip to main content

Group

Struct Group 

Source
pub struct Group<'a> { /* private fields */ }
Expand description

A group: its depth (one plus its SUB prefix; 0 for the unnamed leading group), name, optional header row and records.

Implementations§

Source§

impl<'a> Group<'a>

Source

pub fn name(&self) -> &'a [u8] ⓘ

The group’s name (empty for the unnamed leading group).

Source

pub fn depth(&self) -> usize

Depth: 1 for ␝g, 2 for ␚␝g (one plus the SUB prefix); 0 for the unnamed group.

Source

pub fn has_header(&self) -> bool

Whether the group has a header row.

Source

pub fn header_row(&self) -> Option<Record<'a>>

The header row as a record, if any.

Source

pub fn headers(&self) -> Vec<&'a [u8]>

Header names, or an empty vector.

Source

pub fn header_count(&self) -> usize

Source

pub fn header(&self, i: usize) -> &'a [u8] ⓘ

Source

pub fn record_count(&self) -> usize

Source

pub fn record(&self, i: usize) -> Record<'a>

Source

pub fn records(&self) -> &[Record<'a>]

The records, in order.

Source

pub fn column(&self, name: &str) -> Option<usize>

Index of a header name, or None.

Auto Trait Implementations§

§

impl<'a> Forget for Group<'a>

§

impl<'a> Freeze for Group<'a>

§

impl<'a> Move for Group<'a>

§

impl<'a> RefUnwindSafe for Group<'a>

§

impl<'a> Send for Group<'a>

§

impl<'a> Sync for Group<'a>

§

impl<'a> Unpin for Group<'a>

§

impl<'a> UnsafeUnpin for Group<'a>

§

impl<'a> UnwindSafe for Group<'a>

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.