pub enum TextDocumentFormat<D: TextDocument> {
Complete(D),
Compact(D::CompactTextDocument_),
}Expand description
Contains a document in full or compact format
Variants§
Complete(D)
Complete format (Allows to check the validity of the signature)
Compact(D::CompactTextDocument_)
Format present in the blocks (does not always allow to verify the signature)
Implementations§
Source§impl<D: TextDocument> TextDocumentFormat<D>
impl<D: TextDocument> TextDocumentFormat<D>
Sourcepub fn to_compact_document(&self) -> Cow<'_, D::CompactTextDocument_>
pub fn to_compact_document(&self) -> Cow<'_, D::CompactTextDocument_>
To compact document
Trait Implementations§
Source§impl<D: Clone + TextDocument> Clone for TextDocumentFormat<D>where
D::CompactTextDocument_: Clone,
impl<D: Clone + TextDocument> Clone for TextDocumentFormat<D>where
D::CompactTextDocument_: Clone,
Source§fn clone(&self) -> TextDocumentFormat<D>
fn clone(&self) -> TextDocumentFormat<D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<D: TextDocument> CompactTextDocument for TextDocumentFormat<D>
impl<D: TextDocument> CompactTextDocument for TextDocumentFormat<D>
Source§fn as_compact_text(&self) -> String
fn as_compact_text(&self) -> String
Generate document compact text.
the compact format is the one used in the blocks. Read more
Source§impl<D: Debug + TextDocument> Debug for TextDocumentFormat<D>where
D::CompactTextDocument_: Debug,
impl<D: Debug + TextDocument> Debug for TextDocumentFormat<D>where
D::CompactTextDocument_: Debug,
Source§impl<'de, D> Deserialize<'de> for TextDocumentFormat<D>
impl<'de, D> Deserialize<'de> for TextDocumentFormat<D>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<D: PartialEq + TextDocument> PartialEq for TextDocumentFormat<D>where
D::CompactTextDocument_: PartialEq,
impl<D: PartialEq + TextDocument> PartialEq for TextDocumentFormat<D>where
D::CompactTextDocument_: PartialEq,
Source§impl<D> Serialize for TextDocumentFormat<D>
impl<D> Serialize for TextDocumentFormat<D>
impl<D: Eq + TextDocument> Eq for TextDocumentFormat<D>where
D::CompactTextDocument_: Eq,
impl<D: TextDocument> StructuralPartialEq for TextDocumentFormat<D>
Auto Trait Implementations§
impl<D> Freeze for TextDocumentFormat<D>
impl<D> RefUnwindSafe for TextDocumentFormat<D>
impl<D> Send for TextDocumentFormat<D>
impl<D> Sync for TextDocumentFormat<D>
impl<D> Unpin for TextDocumentFormat<D>
impl<D> UnwindSafe for TextDocumentFormat<D>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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