pub struct SyntheticFrontierName { /* private fields */ }Expand description
Type-distinct name of a synthetic frontier root.
This is not a ThreadName and not a [MarkerName]. Consume, store, and
mirror sites must persist it through the synthetic-ref path.
Implementations§
Source§impl SyntheticFrontierName
impl SyntheticFrontierName
Sourcepub fn new(
thread: impl AsRef<str>,
change_id: ChangeId,
) -> Result<SyntheticFrontierName, SyntheticFrontierNameError>
pub fn new( thread: impl AsRef<str>, change_id: ChangeId, ) -> Result<SyntheticFrontierName, SyntheticFrontierNameError>
Build a synthetic root for thread at change_id.
thread is the user thread whose sibling line this root names. It must
itself be a user name (not heddle/-rooted).
Sourcepub fn parse(
name: &str,
) -> Result<SyntheticFrontierName, SyntheticFrontierNameError>
pub fn parse( name: &str, ) -> Result<SyntheticFrontierName, SyntheticFrontierNameError>
Parse a wire/store name of the form heddle/frontier/<thread>/<full-changeid>.
The last /-segment is the ChangeId (hc- + full Crockford base32).
Everything between heddle/frontier/ and that segment is the thread
name, which may itself contain /.
Sourcepub fn looks_like(name: &str) -> bool
pub fn looks_like(name: &str) -> bool
True when name is a well-formed synthetic frontier root.
pub fn thread(&self) -> &str
pub fn change_id(&self) -> ChangeId
Sourcepub fn as_name(&self) -> String
pub fn as_name(&self) -> String
Wire / local-store name: heddle/frontier/<thread>/<full-changeid>.
Sourcepub fn owning_thread(&self) -> ThreadName
pub fn owning_thread(&self) -> ThreadName
The user thread this synthetic root belongs to, as a ThreadName.
Only the owning user thread is a ThreadName. The synthetic root itself must never be coerced into one.
Trait Implementations§
Source§impl Clone for SyntheticFrontierName
impl Clone for SyntheticFrontierName
Source§fn clone(&self) -> SyntheticFrontierName
fn clone(&self) -> SyntheticFrontierName
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more