Skip to main content

BaseType

Enum BaseType 

Source
pub enum BaseType {
Show 20 variants Unit, Bool, Int, Float, Length, String, InlineText, BlockText, MathText, MathBoxes, Image, InlineBoxes, BlockBoxes, Context, Document, PrePath, Path, Graphics, Font, TextInfo,
}
Expand description

Primitive types with no internal structure — the subset of v0.0.6’s base_type (types.cppo.ml:255) that this port’s primitives need. (EnvType/RegExpType/InputPosType are unused and left out; add them when a primitive needs them.)

Variants§

§

Unit

§

Bool

§

Int

§

Float

§

Length

§

String

§

InlineText

inline-text (v0.0.6: TextRowType).

§

BlockText

block-text (v0.0.6: TextColType).

§

MathText

math (v0.0.6: MathType) — quoted math text. Reused, unmodified, as V0_1’s math-text (upstream literally renamed 0.0.6’s math); see MathBoxes for the new V0_1-only half of the split.

§

MathBoxes

math-boxes (V0_1 only; dev-0-1-0 MathBoxesType) — the evaluated math tree, bridged from MathText by the V0_1 primitive read-math. 0.0.6 has no name for this type (its math conflates both halves) and no value ever types as this under V0_0.

§

Image

image (v0.0.6: ImageType) — a decoded raster image resource (load-image’s result).

§

InlineBoxes

inline-boxes (v0.0.6: BoxRowType).

§

BlockBoxes

block-boxes (v0.0.6: BoxColType).

§

Context

§

Document

§

PrePath

pre-path (v0.0.6: PrePathType).

§

Path

path (v0.0.6: PathType).

§

Graphics

graphics (v0.0.6: GraphicsType).

§

Font

font (V0_1 only; upstream saphe-split types.cppo.ml’s FontType, registered in that generation’s base_type_hash_table as ("font", FontType) and spelled tFONTKEY in primitives.cppo.ml:45) — an OPAQUE handle on one loaded face. Its value is Value::Font, a rustyfi_backend::FontKey index into the metrics provider’s font store, matching upstream’s BCFontKey of FontKey.t.

0.0.6 has no such type at all — verified against upstream v0.0.6 src/frontend/types.cppo.ml:280-303, whose base_type_hash_table has no "font" row, and against lib-satysfi/dist/packages/*.satyh, which declare no type font either. What 0.0.6 calls “a font” is the bare product string * float * float (primitives.cppo.ml:69’s tFONT = tPROD [tS; tFL; tFL]), whose head is an ABBREV naming a row of dist/hash/fonts.satysfi-hash. So under V0_0 the NAME font falls through name_to_mono to the opaque user-nominal Variant("font", []) — an unrelated type that happens to share a spelling. That disagreement is exactly what keeps font inside typecheck::forked_type_names(), and it is a REPRESENTATION fork, not a missing feature: see v1::xver_adapt::forked_note.

§

TextInfo

text-info (v0.0.6: TextInfoType) — the text-mode context (deepen-indent/get-initial-text-info/break; sliver — see primitives.rs for the scoping note: the text/html backends themselves are out of scope).

Implementations§

Source§

impl BaseType

Source

pub fn name(self) -> &'static str

The SATySFi surface-syntax name, used by Display.

Trait Implementations§

Source§

impl Clone for BaseType

Source§

fn clone(&self) -> BaseType

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 Copy for BaseType

Source§

impl Debug for BaseType

Source§

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

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

impl Display for BaseType

Source§

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

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

impl Eq for BaseType

Source§

impl Hash for BaseType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for BaseType

Source§

fn cmp(&self, other: &BaseType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for BaseType

Source§

fn eq(&self, other: &BaseType) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for BaseType

Source§

fn partial_cmp(&self, other: &BaseType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for BaseType

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

Source§

fn clone(&self) -> T

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T> Copy for T
where T: Copy,

Source§

impl<T> Debug for T
where T: Debug,

Source§

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

Source§

impl<T> Display for T
where T: Display,

Source§

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

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Hash for T
where T: Hash,

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V