Skip to main content

InlineExtra

Struct InlineExtra 

Source
pub struct InlineExtra<T, E = ()>(pub E, pub T);

Tuple Fields§

§0: E§1: T

Trait Implementations§

Source§

impl<T: Clone, E: Clone> Clone for InlineExtra<T, E>

Source§

fn clone(&self) -> InlineExtra<T, E>

Returns a duplicate 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<T: Debug, E: Debug> Debug for InlineExtra<T, E>

Source§

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

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

impl<T, E> InlineOutput for InlineExtra<T, E>

Source§

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

Source§

impl<T, E> ListHashes for InlineExtra<T, E>
where E: ListHashes, T: ListHashes,

Source§

fn list_hashes(&self, visitor: &mut impl FnMut(Hash))

Source§

fn topology_hash(&self) -> Hash

Source§

fn point_count(&self) -> usize

Source§

impl<E: 'static + Send + Sync + Clone + ParseInline<I>, X: 'static + Send + Sync + Clone, T: Parse<J>, I: PointInput<Extra = X, WithExtra<(E, X)> = J>, J: ParseInput> Parse<I> for InlineExtra<T, E>

Source§

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

Source§

impl<E: 'static + Send + Sync + Clone + ParseInline<I>, X: 'static + Send + Sync + Clone, T: ParseInline<J>, I: PointInput<Extra = X, WithExtra<(E, X)> = J>, J: ParseInput> ParseInline<I> for InlineExtra<T, E>

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§

fn parse_vec_n(input: &mut I, n: usize) -> Result<Vec<Self>>

Source§

fn parse_array<const N: usize>(input: &mut I) -> Result<[Self; N]>

Source§

fn parse_generic_array<N: ArrayLength>( input: &mut I, ) -> Result<GenericArray<Self, N>>

Source§

impl<T, E> Tagged for InlineExtra<T, E>
where E: Tagged, T: Tagged,

Source§

impl<T, E> ToOutput for InlineExtra<T, E>
where E: InlineOutput, T: ToOutput,

Source§

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

Source§

fn data_hash(&self) -> Hash

Source§

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

Source§

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

Source§

impl<T, E> Topological for InlineExtra<T, E>
where E: Topological, T: Topological,

Source§

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

Source§

fn topology(&self) -> TopoVec

Source§

impl<T: Copy, E: Copy> Copy for InlineExtra<T, E>

Auto Trait Implementations§

§

impl<T, E> Freeze for InlineExtra<T, E>
where E: Freeze, T: Freeze,

§

impl<T, E> RefUnwindSafe for InlineExtra<T, E>

§

impl<T, E> Send for InlineExtra<T, E>
where E: Send, T: Send,

§

impl<T, E> Sync for InlineExtra<T, E>
where E: Sync, T: Sync,

§

impl<T, E> Unpin for InlineExtra<T, E>
where E: Unpin, T: Unpin,

§

impl<T, E> UnsafeUnpin for InlineExtra<T, E>
where E: UnsafeUnpin, T: UnsafeUnpin,

§

impl<T, E> UnwindSafe for InlineExtra<T, E>
where E: UnwindSafe, 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 + Send + Sync>
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> 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<T, Extra> ExtraFor<T> for Extra
where T: for<'a> Parse<Input<'a, Extra>>, Extra: Clone,

Source§

fn parse(&self, data: &[u8], resolve: &Arc<dyn Resolve>) -> Result<T, Error>

Source§

fn parse_checked( &self, hash: Hash, data: &[u8], resolve: &Arc<dyn Resolve>, ) -> Result<T>
where T: FullHash,

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 + ListHashes + 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§

fn reparse(&self) -> Result<Self>
where Self: Traversible,

Source§

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

Source§

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

Source§

fn reparse_extra(&self, extra: &Extra) -> Result<Self>
where Self: Traversible,

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> Traversible for T
where T: 'static + Send + Sync + FullHash + Topological,

Source§

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

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<T, Extra> Inline<Extra> for T
where T: Object<Extra> + InlineOutput + for<'a> ParseInline<Input<'a, Extra>>,

Source§

impl<T, Extra> Object<Extra> for T
where T: Traversible + for<'a> Parse<Input<'a, Extra>>,