Skip to main content

Conflicts

Struct Conflicts 

Source
pub struct Conflicts<StorageT> { /* private fields */ }

Implementations§

Source§

impl<StorageT: 'static + Hash + PrimInt + Unsigned> Conflicts<StorageT>
where usize: AsPrimitive<StorageT>,

Source

pub fn rr_conflicts( &self, ) -> impl Iterator<Item = &(TIdx<StorageT>, PIdx<StorageT>, PIdx<StorageT>, StIdx<StorageT>)>

Return an iterator over all reduce/reduce conflicts.

Source

pub fn sr_conflicts( &self, ) -> impl Iterator<Item = &(TIdx<StorageT>, PIdx<StorageT>, StIdx<StorageT>)>

Return an iterator over all shift/reduce conflicts.

Source

pub fn rr_len(&self) -> usize

How many reduce/reduce conflicts are there?

Source

pub fn sr_len(&self) -> usize

How many shift/reduce conflicts are there?

Source

pub fn pp(&self, grm: &YaccGrammar<StorageT>) -> String

👎Deprecated since 0.10.1:

Please use pp_rr() and pp_sr() instead

Returns a pretty-printed version of the conflicts.

Source

pub fn pp_rr(&self, grm: &YaccGrammar<StorageT>) -> String

Returns a pretty-printed version of the reduce/reduce conflicts.

Source

pub fn pp_sr(&self, grm: &YaccGrammar<StorageT>) -> String

Returns a pretty-printed version of the shift/reduce conflicts.

Trait Implementations§

Source§

impl<StorageT: Debug> Debug for Conflicts<StorageT>

Source§

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

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

impl<'de, StorageT, __WincodeConfig: Config> SchemaRead<'de, __WincodeConfig> for Conflicts<StorageT>
where StorageT: SchemaRead<'de, __WincodeConfig, Dst = StorageT>,

Source§

const TYPE_META: TypeMeta

Metadata about the type’s serialization. Read more
Source§

type Dst = Conflicts<StorageT>

Source§

fn read( reader: impl Reader<'de>, dst: &mut MaybeUninit<Self::Dst>, ) -> ReadResult<()>

Read into dst from reader. Read more
§

fn get(reader: impl Reader<'de>) -> Result<Self::Dst, ReadError>

Read Self::Dst from reader into a new Self::Dst.
Source§

impl<StorageT, __WincodeConfig: Config> SchemaWrite<__WincodeConfig> for Conflicts<StorageT>
where StorageT: SchemaWrite<__WincodeConfig, Src = StorageT>,

Source§

const TYPE_META: TypeMeta

Metadata about the type’s serialization. Read more
Source§

type Src = Conflicts<StorageT>

Source§

fn size_of(src: &Self::Src) -> WriteResult<usize>

Get the serialized size of Self::Src. Read more
Source§

fn write(writer: impl Writer, src: &Self::Src) -> WriteResult<()>

Write Self::Src to writer.

Auto Trait Implementations§

§

impl<StorageT> Freeze for Conflicts<StorageT>

§

impl<StorageT> RefUnwindSafe for Conflicts<StorageT>
where StorageT: RefUnwindSafe,

§

impl<StorageT> Send for Conflicts<StorageT>
where StorageT: Send,

§

impl<StorageT> Sync for Conflicts<StorageT>
where StorageT: Sync,

§

impl<StorageT> Unpin for Conflicts<StorageT>
where StorageT: Unpin,

§

impl<StorageT> UnsafeUnpin for Conflicts<StorageT>

§

impl<StorageT> UnwindSafe for Conflicts<StorageT>
where StorageT: UnwindSafe,

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
§

impl<'de, T> Deserialize<'de> for T
where T: SchemaRead<'de, Configuration>,

§

fn deserialize(src: &'de [u8]) -> Result<Self::Dst, ReadError>

Deserialize the input src bytes into a new Self::Dst.
§

fn deserialize_into( src: &'de [u8], dst: &mut MaybeUninit<Self::Dst>, ) -> Result<(), ReadError>

Deserialize the input src bytes into dst.
§

impl<'de, T, C> Deserialize<'de, C> for T
where C: Config, T: SchemaRead<'de, C>,

§

fn deserialize(src: &'de [u8], config: C) -> Result<Self::Dst, ReadError>

Deserialize the input bytes into a new Self::Dst.
§

fn deserialize_into( src: &'de [u8], dst: &mut MaybeUninit<Self::Dst>, config: C, ) -> Result<(), ReadError>

Deserialize the input bytes into dst.
§

impl<T, C> DeserializeOwned<C> for T
where C: Config, T: SchemaReadOwned<C>,

§

fn deserialize_from<'de>(src: impl Reader<'de>) -> Result<Self::Dst, ReadError>

Deserialize from the given [Reader] into a new Self::Dst.
§

fn deserialize_from_into<'de>( src: impl Reader<'de>, dst: &mut MaybeUninit<Self::Dst>, ) -> Result<(), ReadError>

Deserialize from the given [Reader] into dst.
§

impl<T> DeserializeOwned for T
where T: SchemaReadOwned<Configuration>,

§

fn deserialize_from<'de>(src: impl Reader<'de>) -> Result<Self::Dst, ReadError>

Deserialize from the given [Reader] into a new Self::Dst.
§

fn deserialize_from_into<'de>( src: impl Reader<'de>, dst: &mut MaybeUninit<Self::Dst>, ) -> Result<(), ReadError>

Deserialize from the given [Reader] into dst.
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.

§

impl<T, C> Serialize<C> for T
where C: Config, T: SchemaWrite<C> + ?Sized,

§

fn serialize(src: &Self::Src, config: C) -> Result<Vec<u8>, WriteError>

Serialize a serializable type into a Vec of bytes.
§

fn serialize_into( dst: impl Writer, src: &Self::Src, config: C, ) -> Result<(), WriteError>

Serialize a serializable type into the given [Writer].
§

fn serialized_size(src: &Self::Src, config: C) -> Result<u64, WriteError>

Get the size in bytes of the type when serialized.
§

impl<T> Serialize for T
where T: SchemaWrite<Configuration> + ?Sized,

§

fn serialize(src: &Self::Src) -> Result<Vec<u8>, WriteError>

Serialize a serializable type into a Vec of bytes.
§

fn serialize_into(dst: impl Writer, src: &Self::Src) -> Result<(), WriteError>

Serialize a serializable type into the given byte buffer.
§

fn serialized_size(src: &Self::Src) -> Result<u64, WriteError>

Get the size in bytes of the type when serialized.
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.
§

impl<T, C> SchemaReadOwned<C> for T
where C: ConfigCore, T: for<'de> SchemaRead<'de, C>,