pub enum AnyFragment {
Ts(TsFragment),
Cs(Fragment),
}Expand description
The two shapes a cached fragment can have. Each rel is keyed to whichever
shape the file’s grammar produced; the ts: 1 tag is what tells them
apart, on disk and at the
resolver’s door. Untagged, and TS FIRST: a C#/markup fragment carries no
ts key (so the TS arm always fails on it) and a TS fragment carries no
usings (so the C# arm always fails on it) – the discrimination is total
in both directions, never a first-match-wins guess.
Variants§
Trait Implementations§
Source§impl Clone for AnyFragment
impl Clone for AnyFragment
Source§impl Debug for AnyFragment
impl Debug for AnyFragment
Source§impl<'de> Deserialize<'de> for AnyFragment
impl<'de> Deserialize<'de> for AnyFragment
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 From<Fragment> for AnyFragment
impl From<Fragment> for AnyFragment
Source§impl From<TsFragment> for AnyFragment
impl From<TsFragment> for AnyFragment
Source§fn from(f: TsFragment) -> Self
fn from(f: TsFragment) -> Self
Converts to this type from the input type.
Source§impl PartialEq for AnyFragment
impl PartialEq for AnyFragment
Source§impl Serialize for AnyFragment
impl Serialize for AnyFragment
impl StructuralPartialEq for AnyFragment
Auto Trait Implementations§
impl Freeze for AnyFragment
impl RefUnwindSafe for AnyFragment
impl Send for AnyFragment
impl Sync for AnyFragment
impl Unpin for AnyFragment
impl UnsafeUnpin for AnyFragment
impl UnwindSafe for AnyFragment
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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