EnumTag

Struct EnumTag 

Source
pub struct EnumTag<T, const MAX: usize>(/* private fields */);

Implementations§

Source§

impl<T: UsizeTag, const MAX: usize> EnumTag<T, MAX>

Source

pub fn to_usize(&self) -> usize

Source

pub fn from_const<const N: usize>() -> Self

Trait Implementations§

Source§

impl<T, const MAX: usize> MaybeHasNiche for EnumTag<T, MAX>
where T: MaybeHasNiche<MnArray: MnArray<MaybeNiche: MaybeNiche>>,

Source§

type MnArray = TArr<<<T as MaybeHasNiche>::MnArray as MnArray>::MaybeNiche, ATerm>

Source§

impl<T, const MAX: usize, __I: ParseInput> Parse<__I> for EnumTag<T, MAX>
where Self: ParseInline<__I>,

Source§

fn parse(input: __I) -> Result<Self>

Source§

impl<T: ParseInline<I> + UsizeTag, I: ParseInput, const MAX: usize> ParseInline<I> for EnumTag<T, MAX>

Source§

fn parse_inline(input: &mut I) -> Result<Self>

Source§

fn parse_as_inline(input: I) -> Result<Self>

Source§

fn parse_vec(input: I) -> Result<Vec<Self>>

Source§

impl<T, const MAX: usize, __Output: Unsigned> Size for EnumTag<T, MAX>
where T: Size, TArr<<T as Size>::Size, ATerm>: FoldAdd<Output = __Output>,

Source§

const SIZE: usize = <T as ::object_rainbow::Size>::SIZE

Source§

type Size = <TArr<<T as Size>::Size, ATerm> as FoldAdd>::Output

Source§

impl<T, const MAX: usize> Tagged for EnumTag<T, MAX>
where T: Tagged,

Source§

const TAGS: Tags = <T as ::object_rainbow::Tagged>::TAGS

Source§

const HASH: Hash = _

Source§

impl<T, const MAX: usize> ToOutput for EnumTag<T, MAX>
where T: ToOutput,

Source§

fn to_output(&self, output: &mut dyn Output)

Source§

fn data_hash(&self) -> Hash

Source§

fn slice_to_output(slice: &[Self], output: &mut dyn Output)
where Self: Sized,

Source§

fn output<T: Output + Default>(&self) -> T

Source§

fn vec(&self) -> Vec<u8>

Source§

impl<T, const MAX: usize> Topological for EnumTag<T, MAX>
where T: Topological,

Source§

fn accept_points(&self, visitor: &mut impl PointVisitor)

Source§

fn topology_hash(&self) -> Hash

Source§

fn point_count(&self) -> usize

Source§

fn topology(&self) -> TopoVec

Source§

impl<T: UsizeTag, const MAX: usize> UsizeTag for EnumTag<T, MAX>

Auto Trait Implementations§

§

impl<T, const MAX: usize> Freeze for EnumTag<T, MAX>
where T: Freeze,

§

impl<T, const MAX: usize> RefUnwindSafe for EnumTag<T, MAX>
where T: RefUnwindSafe,

§

impl<T, const MAX: usize> Send for EnumTag<T, MAX>
where T: Send,

§

impl<T, const MAX: usize> Sync for EnumTag<T, MAX>
where T: Sync,

§

impl<T, const MAX: usize> Unpin for EnumTag<T, MAX>
where T: Unpin,

§

impl<T, const MAX: usize> UnwindSafe for EnumTag<T, MAX>
where T: 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> AsAny for T

Source§

fn any_ref(&self) -> &(dyn Any + 'static)
where T: 'static,

Get a shared RTTI reference.
Source§

fn any_mut(&mut self) -> &mut (dyn Any + 'static)
where T: 'static,

Get an exclusive RTTI reference.
Source§

fn any_box(self: Box<T>) -> Box<dyn Any>
where T: 'static,

Get an RTTI Box.
Source§

fn any_arc(self: Arc<T>) -> Arc<dyn Any>
where T: 'static,

Get an RTTI Arc.
Source§

fn any_arc_sync(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
where T: 'static + Send + Sync,

Get an RTTI Arc which is also Send.
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> FullHash for T
where T: ToOutput + Topological + Tagged + ?Sized,

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> ParseSlice for T
where T: for<'a> Parse<Input<'a>>,

Source§

fn parse_slice(data: &[u8], resolve: &Arc<dyn Resolve>) -> Result<Self>

Source§

impl<T, Extra> ParseSliceExtra<Extra> for T
where T: for<'a> Parse<Input<'a, Extra>>,

Source§

fn parse_slice_extra( data: &[u8], resolve: &Arc<dyn Resolve>, extra: &Extra, ) -> Result<Self>

Source§

impl<T> ParseSliceRefless for T
where T: for<'a> Parse<ReflessInput<'a>>,

Source§

fn parse_slice_refless(data: &[u8]) -> Result<Self>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Traversible for T
where T: 'static + Send + Sync + FullHash,

Source§

fn to_resolve(&self) -> Arc<dyn Resolve>

Source§

fn point(self) -> Point<Self>
where Self: Clone,

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.