pub enum RefKind {
Thread,
Marker,
SyntheticFrontierRoot,
}Expand description
Type-distinct discriminator for an advertised ref.
Synthetic frontier roots must never be coerced into a ThreadName or
MarkerName. Match on this enum at every consume/store/mirror site.
Variants§
Implementations§
Source§impl RefKind
impl RefKind
Sourcepub fn from_advertised_name(name: &str, advertised_as_thread: bool) -> Self
pub fn from_advertised_name(name: &str, advertised_as_thread: bool) -> Self
Classify an advertised name.
A well-formed synthetic frontier name is always
RefKind::SyntheticFrontierRoot, even if a boolean is_thread flag
still claims otherwise. A reserved heddle/ name that is not a
well-formed frontier root is also classified as synthetic so it cannot
fall through to the thread or marker arms (fail closed).
pub fn is_user_thread(self) -> bool
pub fn is_marker(self) -> bool
Trait Implementations§
impl Copy for RefKind
Source§impl<'de> Deserialize<'de> for RefKind
impl<'de> Deserialize<'de> for RefKind
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
impl Eq for RefKind
impl StructuralPartialEq for RefKind
Auto Trait Implementations§
impl Freeze for RefKind
impl RefUnwindSafe for RefKind
impl Send for RefKind
impl Sync for RefKind
impl Unpin for RefKind
impl UnsafeUnpin for RefKind
impl UnwindSafe for RefKind
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