Skip to main content

Sequence

Struct Sequence 

Source
pub struct Sequence {
    pub high_value: u8,
    pub low_value: u8,
    /* private fields */
}

Fields§

§high_value: u8§low_value: u8

Implementations§

Source§

impl Sequence

Source

pub fn native() -> Self

Source

pub fn program( environment: &Environment, page: &CodePage, ) -> Result<Self, String>

The program’s sequence: its PROGRAM COLLATING SEQUENCE, else EBCDIC.

Source

pub fn named( environment: &Environment, name: &str, page: &CodePage, ) -> Result<Self, String>

Source

pub fn of(alphabet: &Alphabet, page: &CodePage) -> Result<Self, String>

STANDARD-1 and STANDARD-2 are 7-bit ASCII’s order: ASCII_COLLATION in numeric::assumptions.

Source

pub fn figurative(&self, f: Figurative) -> u8

A figurative constant’s character: HIGH-VALUE and LOW-VALUE are this sequence’s highest and lowest.

Source

pub fn collation(&self) -> &Collation

Source

pub fn is_native(&self) -> bool

Source

pub fn positions(&self) -> [u8; 256]

Each character’s position, from 0: what a sort key collates by.

Source

pub fn ordinal(&self, byte: u8) -> u16

FUNCTION ORD: the character’s position, from 1.

Source

pub fn character(&self, ordinal: i64) -> Option<u8>

FUNCTION CHAR: the character at a position, from 1; the first given it when several share it.

Source

pub fn count(&self) -> usize

How many positions there are: the most FUNCTION CHAR takes.

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> 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.