Enum EmbedPrelim

Source
pub enum EmbedPrelim<T> {
    Primitive(Any),
    Shared(T),
}
Expand description

Prelim container for types passed over to [Text::insert_embed] and [Text::insert_embed_with_attributes] methods.

Variants§

§

Primitive(Any)

§

Shared(T)

Trait Implementations§

Source§

impl<T: Debug> Debug for EmbedPrelim<T>

Source§

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

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

impl<T> From<T> for EmbedPrelim<T>
where T: Into<Any>,

Source§

fn from(value: T) -> Self

Converts to this type from the input type.
Source§

impl Into<EmbedPrelim<ArrayPrelim>> for ArrayPrelim

Source§

fn into(self) -> EmbedPrelim<ArrayPrelim>

Converts this type into the (usually inferred) input type.
Source§

impl Into<EmbedPrelim<MapPrelim>> for MapPrelim

Source§

fn into(self) -> EmbedPrelim<MapPrelim>

Converts this type into the (usually inferred) input type.
Source§

impl Into<EmbedPrelim<TextPrelim>> for TextPrelim

Source§

fn into(self) -> EmbedPrelim<TextPrelim>

Converts this type into the (usually inferred) input type.
Source§

impl Into<EmbedPrelim<XmlElementPrelim>> for XmlElementPrelim

Source§

fn into(self) -> EmbedPrelim<XmlElementPrelim>

Converts this type into the (usually inferred) input type.
Source§

impl Into<EmbedPrelim<XmlFragmentPrelim>> for XmlFragmentPrelim

Source§

fn into(self) -> EmbedPrelim<XmlFragmentPrelim>

Converts this type into the (usually inferred) input type.
Source§

impl Into<EmbedPrelim<XmlTextPrelim>> for XmlTextPrelim

Source§

fn into(self) -> EmbedPrelim<XmlTextPrelim>

Converts this type into the (usually inferred) input type.
Source§

impl<T> Prelim for EmbedPrelim<T>
where T: Prelim,

Source§

type Return = <T as Prelim>::Return

Type of a value to be returned as a result of inserting this Prelim type instance. Use Unused if none is necessary.
Source§

fn into_content( self, txn: &mut TransactionMut<'_>, ) -> (ItemContent, Option<Self>)

This method is used to create initial content required in order to create a block item. A supplied ptr can be used to identify block that is about to be created to store the returned content. Read more
Source§

fn integrate(self, txn: &mut TransactionMut<'_>, inner_ref: BranchPtr)

Method called once an original item filled with content from Self::into_content has been added to block store. This method is used by complex types such as maps or arrays to append the original contents of prelim struct into YMap, YArray etc.

Auto Trait Implementations§

§

impl<T> Freeze for EmbedPrelim<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for EmbedPrelim<T>
where T: RefUnwindSafe,

§

impl<T> Send for EmbedPrelim<T>
where T: Send,

§

impl<T> Sync for EmbedPrelim<T>
where T: Sync,

§

impl<T> Unpin for EmbedPrelim<T>
where T: Unpin,

§

impl<T> UnwindSafe for EmbedPrelim<T>
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> 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, 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, 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.