pub struct EmptySpec { /* private fields */ }
Expand description

An empty specification for use with examples or testing.

This struct isn’t intended for production use and should only be used for examples or PoCs. Use at your own risk - may change in the future without warning.

NOT SUITABLE FOR PRODUCTION

Implementations§

source§

impl EmptySpec

source

pub fn with_children(id: u64, children: Vec<EmptySpec>) -> Self

source

pub fn with_data(id: u64, data: &[u8]) -> Self

Trait Implementations§

source§

impl Clone for EmptySpec

source§

fn clone(&self) -> EmptySpec

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EmptySpec

source§

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

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

impl EbmlSpecification<EmptySpec> for EmptySpec

source§

fn get_tag_data_type(_id: u64) -> Option<TagDataType>

Pulls the data type for a tag from the spec, based on the tag id. Read more
source§

fn get_path_by_id(_id: u64) -> &'static [PathPart]

Gets the schema path of a specific tag. Read more
source§

fn get_unsigned_int_tag(_id: u64, _data: u64) -> Option<EmptySpec>

Creates an unsigned integer type tag from the spec. Read more
source§

fn get_signed_int_tag(_id: u64, _data: i64) -> Option<EmptySpec>

Creates a signed integer type tag from the spec. Read more
source§

fn get_utf8_tag(_id: u64, _data: String) -> Option<EmptySpec>

Creates a utf8 type tag from the spec. Read more
source§

fn get_binary_tag(id: u64, data: &[u8]) -> Option<EmptySpec>

Creates a binary type tag from the spec. Read more
source§

fn get_float_tag(_id: u64, _data: f64) -> Option<EmptySpec>

Creates a float type tag from the spec. Read more
source§

fn get_master_tag(id: u64, data: Master<EmptySpec>) -> Option<EmptySpec>

Creates a master type tag from the spec. Read more
source§

fn get_raw_tag(id: u64, data: &[u8]) -> EmptySpec

Creates a tag that does not conform to the spec. Read more
source§

fn get_tag_id(item: &T) -> u64

Gets the id of a specific tag variant. Read more
source§

fn get_path_by_tag(item: &T) -> &'static [PathPart]

Gets the schema path of a specific tag variant. Read more
source§

impl EbmlTag<EmptySpec> for EmptySpec

source§

fn get_id(&self) -> u64

Gets the id of self. Read more
source§

fn as_unsigned_int(&self) -> Option<&u64>

Gets a reference to the data contained in self as an unsigned integer. Read more
source§

fn as_signed_int(&self) -> Option<&i64>

Gets a reference to the data contained in self as an integer. Read more
source§

fn as_utf8(&self) -> Option<&str>

Gets a reference to the data contained in self as string slice. Read more
source§

fn as_binary(&self) -> Option<&[u8]>

Gets a reference to the data contained in self as binary data. Read more
source§

fn as_float(&self) -> Option<&f64>

Gets a reference to the data contained in self as float data. Read more
source§

fn as_master(&self) -> Option<&Master<EmptySpec>>

Gets a reference to master data contained in self. Read more
source§

impl Ord for EmptySpec

source§

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

This method returns an Ordering between self and other. Read more
1.21.0 · source§

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

Compares and returns the maximum of two values. Read more
1.21.0 · source§

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

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

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

impl PartialEq<EmptySpec> for EmptySpec

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<EmptySpec> for EmptySpec

source§

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

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Eq for EmptySpec

source§

impl StructuralEq for EmptySpec

source§

impl StructuralPartialEq for EmptySpec

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · 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> ToOwned for Twhere T: Clone,

§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.