pub enum ValueContent {
Shown,
Own,
}Expand description
The purpose of a copy: whether the copied content shows document content a
second time or belongs to the value. The code that builds the value passes it
to copy_run_into_value or copy_pieces_into_value.
The purpose decides how each node is copied: a copy of the value’s own
copies every node as it is, and a copy shown again asks each node’s element
what to put in its place (copied_as); see the module
documentation.
The purpose affects the copy only: the value records nothing of it, and every diagnostic its content raises when the value is brought up to date and lowered is reported, regardless of the purpose.
Variants§
Shown
Content of the document shown a second time, away from where it is
written: what a reference shows of the point it refers to (a heading’s
title, a list item’s tag, the alternative text of a float’s caption).
Each node is copied as its element’s
InCopy aspect says.
Own
Content the value holds as its own: a structure the value builds around content lowered nowhere else (the list of an xnote kind, the lead-in of a term definition), the use site of a user definition copied to be expanded in place, or content copied only to be read. Every node is copied as it is, regardless of what its element would put in its place for a copy shown again, because a use site copied to be expanded in place is the document’s content there, and content copied to be read must be what was written.
Trait Implementations§
Source§impl Clone for ValueContent
impl Clone for ValueContent
impl Copy for ValueContent
Source§impl Debug for ValueContent
impl Debug for ValueContent
impl Eq for ValueContent
Source§impl PartialEq for ValueContent
impl PartialEq for ValueContent
impl StructuralPartialEq for ValueContent
Auto Trait Implementations§
impl Forget for ValueContent
impl Freeze for ValueContent
impl Move for ValueContent
impl RefUnwindSafe for ValueContent
impl Send for ValueContent
impl Sync for ValueContent
impl Unpin for ValueContent
impl UnsafeUnpin for ValueContent
impl UnwindSafe for ValueContent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more