pub struct LinkNetwork { /* private fields */ }Expand description
Mutable links network for CST, AST, semantic, and self-description links.
Implementations§
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn freeze(self) -> ReadOnlyNetwork
pub fn freeze(self) -> ReadOnlyNetwork
Freezes this network into a read-only view, consuming it.
Mutators are unreachable on the returned ReadOnlyNetwork at compile
time; only &self operations remain available.
Sourcepub fn as_read_only(&self) -> ReadOnlyNetwork
pub fn as_read_only(&self) -> ReadOnlyNetwork
Returns a read-only view sharing a clone of this network.
Sourcepub fn parse_engine(
text: &str,
language: &str,
configuration: ParseConfiguration,
) -> EngineNetwork
pub fn parse_engine( text: &str, language: &str, configuration: ParseConfiguration, ) -> EngineNetwork
Parses source text honouring the configured engine access mode.
Under AccessMode::Mutable (the default) this returns an editable
network; under AccessMode::ReadOnly it returns the frozen form,
where mutation attempts at the engine boundary fail with a clear
diagnostic.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn parse_fluent(
text: &str,
language: &str,
configuration: ParseConfiguration,
) -> FluentPipeline
pub fn parse_fluent( text: &str, language: &str, configuration: ParseConfiguration, ) -> FluentPipeline
Parses source text and starts a fluent chain.
Sourcepub fn apply_link_cli_substitution_text(
&mut self,
source: &str,
) -> Result<SubstitutionReport, LinkCliSubstitutionError>
pub fn apply_link_cli_substitution_text( &mut self, source: &str, ) -> Result<SubstitutionReport, LinkCliSubstitutionError>
Applies a link-cli-style substitution command.
§Errors
Returns LinkCliSubstitutionError when the command text is malformed.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn seed_common_concept_ontology(&mut self) -> ConceptOntologySeedReport
pub fn seed_common_concept_ontology(&mut self) -> ConceptOntologySeedReport
Seeds the network with the shared common concept ontology.
The seed combines meta-expression’s semantic lexicon with structural programming-language concepts that are shared across the current language targets.
Sourcepub fn intern_concept(
&mut self,
exact_id: &str,
definition: Option<&str>,
) -> LinkId
pub fn intern_concept( &mut self, exact_id: &str, definition: Option<&str>, ) -> LinkId
Interns a language-free concept by exact identifier.
The identifier is matched exactly: case changes, diacritic changes, or sense suffixes are distinct concept ids and therefore produce distinct concept links.
Sourcepub fn insert_concept_expression(
&mut self,
concept: &str,
language: &str,
expression: &str,
) -> LinkId
pub fn insert_concept_expression( &mut self, concept: &str, language: &str, expression: &str, ) -> LinkId
Inserts a language-bound expression linked to a language-free concept.
The concept is reused only when concept exactly matches an existing
concept id; otherwise a new concept link is minted.
Sourcepub fn insert_concept_mapping(
&mut self,
concept: &str,
language: &str,
syntax: &str,
) -> LinkId
pub fn insert_concept_mapping( &mut self, concept: &str, language: &str, syntax: &str, ) -> LinkId
Inserts a concept-to-language syntax mapping and returns the semantic link id.
Sourcepub fn insert_concept_alias(
&mut self,
concept_link: LinkId,
vocabulary: &str,
external_id: &str,
) -> LinkId
pub fn insert_concept_alias( &mut self, concept_link: LinkId, vocabulary: &str, external_id: &str, ) -> LinkId
Attaches an external vocabulary id to a concept without changing its exact concept id.
Sourcepub fn import_concept_ontology_lino(
&mut self,
text: &str,
) -> Result<ConceptOntologyImportReport, LinoSerializationError>
pub fn import_concept_ontology_lino( &mut self, text: &str, ) -> Result<ConceptOntologyImportReport, LinoSerializationError>
Imports concept, expression, and alias links from canonical LiNo text.
The input is the links-notation text produced by LinkNetwork::to_lino.
Importing the same text repeatedly is idempotent because concepts,
expressions, and aliases are all deduplicated by exact link shape.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn render_markup_document(
&self,
language: &str,
document: &FormattingDocument,
) -> String
pub fn render_markup_document( &self, language: &str, document: &FormattingDocument, ) -> String
Renders a language-free FormattingDocument (the concept layer) into
language surface syntax using the seeded per-format templates.
Sourcepub fn translate_markup_document(
&self,
source_language: &str,
target_language: &str,
text: &str,
) -> Option<String>
pub fn translate_markup_document( &self, source_language: &str, target_language: &str, text: &str, ) -> Option<String>
Parses text written in source_language into the language-free concept
layer, then renders it as target_language surface syntax.
This is the cross-format reconstruction substrate: a Markdown document using bold/italic/heading/list/link round-trips to HTML and back through the shared concept ontology.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn seed_document_formatting_concepts(
&mut self,
) -> DocumentFormattingSeedReport
pub fn seed_document_formatting_concepts( &mut self, ) -> DocumentFormattingSeedReport
Seeds the shared document-formatting concept set with per-format syntax mappings.
Each concept becomes a language-free LinkType::Concept link, and each
(language, template) pair becomes a semantic syntax mapping so the same
concept reconstructs as **…** in Markdown, <strong>…</strong> in
HTML, and so on.
Sourcepub fn resolve_document_format(
&self,
language: &str,
fragment: &str,
) -> Option<DocumentFormatMatch>
pub fn resolve_document_format( &self, language: &str, fragment: &str, ) -> Option<DocumentFormatMatch>
Resolves a formatting fragment written in language to the shared,
language-free concept it denotes.
Both Markdown **bold** and HTML <strong>bold</strong> resolve to the
one seeded strong concept link. Returns None when the fragment is not
a known formatting construct or the concept set has not been seeded.
Sourcepub fn render_document_format(
&self,
concept: &str,
language: &str,
instance: &DocumentFormatInstance,
) -> Option<String>
pub fn render_document_format( &self, concept: &str, language: &str, instance: &DocumentFormatInstance, ) -> Option<String>
Renders a concept instance into language surface syntax.
Returns None when the concept has no template for the language or a
required attribute is missing from the instance.
Sourcepub fn translate_document_format(
&self,
source_language: &str,
target_language: &str,
fragment: &str,
) -> Option<String>
pub fn translate_document_format( &self, source_language: &str, target_language: &str, fragment: &str, ) -> Option<String>
Translates a single formatting fragment from source_language to
target_language through the shared concept layer.
Sourcepub fn document_formatting_concept(&self, concept: &str) -> Option<LinkId>
pub fn document_formatting_concept(&self, concept: &str) -> Option<LinkId>
Returns the seeded concept link for a formatting concept id, when present.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn apply_edit(&mut self, range: ByteRange, replacement: &str) -> bool
pub fn apply_edit(&mut self, range: ByteRange, replacement: &str) -> bool
Applies a byte-range source edit and reparses the network.
Tree-sitter-backed languages use tree-sitter’s incremental parse path; other languages fall back to the built-in lossless parser. Links whose source spans are outside the replaced byte range keep their identifiers.
Sourcepub fn apply_edit_with_configuration(
&mut self,
range: ByteRange,
replacement: &str,
configuration: ParseConfiguration,
) -> bool
pub fn apply_edit_with_configuration( &mut self, range: ByteRange, replacement: &str, configuration: ParseConfiguration, ) -> bool
Applies a byte-range source edit using an explicit parse configuration.
Returns false when the range is outside the reconstructed source text,
splits a UTF-8 code point, or the network has no document language.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn self_describing() -> Self
pub fn self_describing() -> Self
Creates a links network containing the common self-description roots.
Sourcepub fn self_description_text(&self) -> String
pub fn self_description_text(&self) -> String
Serializes the seeded self-description roots as LiNo-style definition lines.
Sourcepub fn parse(
text: &str,
language: &str,
configuration: ParseConfiguration,
) -> Self
pub fn parse( text: &str, language: &str, configuration: ParseConfiguration, ) -> Self
Parses plain source text into a lossless token network.
This is the default parse operation. It is lossless by construction; use
LinkNetwork::projected_links when a lower-level view should be
stripped away for CST, AST, or semantic-only work.
Sourcepub fn parse_lossless_text(
text: &str,
language: &str,
configuration: ParseConfiguration,
) -> Self
pub fn parse_lossless_text( text: &str, language: &str, configuration: ParseConfiguration, ) -> Self
Parses plain source text into a lossless token network.
This parser boundary preserves source spans, trivia links, recovery markers, and mixed-region metadata behind the same network representation.
Number of network handles sharing one immutable link allocation.
Sourcepub fn interned_string_count(&self, value: &str) -> Option<usize>
pub fn interned_string_count(&self, value: &str) -> Option<usize>
Number of internal handles sharing an interned string value.
Sourcepub fn projected_links(
&self,
projection: NetworkProjection,
) -> impl Iterator<Item = &Link>
pub fn projected_links( &self, projection: NetworkProjection, ) -> impl Iterator<Item = &Link>
Iterates over links included in the selected projection.
Sourcepub fn reconstruct_text(&self) -> String
pub fn reconstruct_text(&self) -> String
Reconstructs source text from non-missing token links ordered by span.
Sourcepub fn embedded_regions(&self) -> Vec<EmbeddedRegion>
pub fn embedded_regions(&self) -> Vec<EmbeddedRegion>
Returns embedded mixed-language regions discovered during parse.
Sourcepub fn query_links(&self, query: &LinkQuery) -> Vec<&Link>
pub fn query_links(&self, query: &LinkQuery) -> Vec<&Link>
Returns links matching a structural query.
Sourcepub fn query_matches(&self, query: &LinkQuery) -> Vec<QueryMatch>
pub fn query_matches(&self, query: &LinkQuery) -> Vec<QueryMatch>
Returns query matches with capture bindings.
Sourcepub fn query_matches_with(
&self,
query: &LinkQuery,
predicate_host: &impl QueryPredicateHost,
) -> Vec<QueryMatch>
pub fn query_matches_with( &self, query: &LinkQuery, predicate_host: &impl QueryPredicateHost, ) -> Vec<QueryMatch>
Returns query matches with host-evaluated predicate support.
Sourcepub fn insert_point(&mut self, term: &str) -> LinkId
pub fn insert_point(&mut self, term: &str) -> LinkId
Inserts a self-referential point link for a term.
Sourcepub fn insert_object(&mut self, term: &str) -> LinkId
pub fn insert_object(&mut self, term: &str) -> LinkId
Inserts an object-identity point link.
Sourcepub fn insert_relation<const N: usize>(
&mut self,
references: [LinkId; N],
link_type: LinkType,
span: SourceSpan,
) -> LinkId
pub fn insert_relation<const N: usize>( &mut self, references: [LinkId; N], link_type: LinkType, span: SourceSpan, ) -> LinkId
Inserts a relation link with source span metadata.
Sourcepub fn insert_field(
&mut self,
parent: LinkId,
label: &str,
child: LinkId,
) -> LinkId
pub fn insert_field( &mut self, parent: LinkId, label: &str, child: LinkId, ) -> LinkId
Inserts a labeled field relation as a regular link.
Sourcepub fn insert_link<const N: usize>(
&mut self,
references: [LinkId; N],
metadata: LinkMetadata,
) -> LinkId
pub fn insert_link<const N: usize>( &mut self, references: [LinkId; N], metadata: LinkMetadata, ) -> LinkId
Inserts a link from references and metadata.
Sourcepub fn reconstruct_concept(&self, concept: &str, language: &str) -> Option<&str>
pub fn reconstruct_concept(&self, concept: &str, language: &str) -> Option<&str>
Reconstructs a concept using a target language syntax mapping.
Sourcepub fn apply_substitution(
&mut self,
rule: &SubstitutionRule,
) -> SubstitutionReport
pub fn apply_substitution( &mut self, rule: &SubstitutionRule, ) -> SubstitutionReport
Applies a match-and-substitute rule over exact reference lists.
Sourcepub fn apply_variable_substitution(
&mut self,
rule: &VariableSubstitutionRule,
) -> SubstitutionReport
pub fn apply_variable_substitution( &mut self, rule: &VariableSubstitutionRule, ) -> SubstitutionReport
Applies a match-and-substitute rule with link-cli-style variables.
Sourcepub fn find_term(&self, term: &str) -> Option<LinkId>
pub fn find_term(&self, term: &str) -> Option<LinkId>
Finds a self-description or named term link.
Sourcepub fn definition_for(&self, id: LinkId) -> Option<&str>
pub fn definition_for(&self, id: LinkId) -> Option<&str>
Finds the definition attached to a term link.
Sourcepub fn set_span(&mut self, id: LinkId, span: SourceSpan) -> bool
pub fn set_span(&mut self, id: LinkId, span: SourceSpan) -> bool
Sets a source span on an existing link.
Sourcepub fn set_flags(&mut self, id: LinkId, flags: LinkFlags) -> bool
pub fn set_flags(&mut self, id: LinkId, flags: LinkFlags) -> bool
Sets parse flags on an existing link.
Sourcepub fn verify_full_match(&self, region: Option<ByteRange>) -> VerificationReport
pub fn verify_full_match(&self, region: Option<ByteRange>) -> VerificationReport
Verifies that the selected region has no error or missing links.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn to_lino(&self) -> String
pub fn to_lino(&self) -> String
Serializes the entire network to canonical links-notation text.
Every link becomes one statement keyed by its numeric id. The output is
accepted by the [links_notation] crate parser and round-trips back
through LinkNetwork::from_lino.
Sourcepub fn from_lino(text: &str) -> Result<Self, LinoSerializationError>
pub fn from_lino(text: &str) -> Result<Self, LinoSerializationError>
Reconstructs a network from text produced by LinkNetwork::to_lino.
§Errors
Returns LinoSerializationError when the text is not valid
links-notation or does not match the serialization schema.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn parse_with_registry(
registry: &ParserRegistry,
text: &str,
language: &str,
configuration: ParseConfiguration,
) -> Self
pub fn parse_with_registry( registry: &ParserRegistry, text: &str, language: &str, configuration: ParseConfiguration, ) -> Self
Parses source text through a pluggable ParserRegistry.
Dispatch honors user registrations, which shadow the built-in set for
the same language key; keys without an explicit registration fall
through to the same built-in dispatch LinkNetwork::parse uses.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn reconstruct_text_as(
&self,
target_language: &str,
configuration: ParseConfiguration,
) -> String
pub fn reconstruct_text_as( &self, target_language: &str, configuration: ParseConfiguration, ) -> String
Reconstructs text for a target language or formalization level.
Natural same-language reconstruction returns the original byte-exact token stream. When semantic proposition links are available, target natural-language text and configured formal representations are rendered through the shared concept mappings.
Sourcepub fn reconstruct_text_as_with_rules(
&self,
target_language: &str,
configuration: ParseConfiguration,
rule_set: &TranslationRuleSet,
) -> String
pub fn reconstruct_text_as_with_rules( &self, target_language: &str, configuration: ParseConfiguration, rule_set: &TranslationRuleSet, ) -> String
Reconstructs text using a caller-supplied translation rule set.
Sourcepub fn reconstruct_text_as_with_registry(
&self,
target_language: &str,
configuration: ParseConfiguration,
registry: &TranslationRuleRegistry,
) -> String
pub fn reconstruct_text_as_with_registry( &self, target_language: &str, configuration: ParseConfiguration, registry: &TranslationRuleRegistry, ) -> String
Reconstructs text through the active rule set in a registry.
Sourcepub fn reconstruct_text_as_with_rules_mut(
&mut self,
target_language: &str,
configuration: ParseConfiguration,
rule_set: &TranslationRuleSet,
) -> String
pub fn reconstruct_text_as_with_rules_mut( &mut self, target_language: &str, configuration: ParseConfiguration, rule_set: &TranslationRuleSet, ) -> String
Reconstructs text and records diagnostic links when no rule can render it.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn insert_object_instance(&mut self, type_id: LinkId) -> LinkId
pub fn insert_object_instance(&mut self, type_id: LinkId) -> LinkId
Inserts an anonymous object identity linked to its Rust/meta type.
The resulting object references itself first, preserving a stable identity link for shared and circular object graphs, and references the type shape second so the object’s declaration remains queryable.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn snapshot(
&self,
version: u64,
provenance: impl Into<String>,
) -> NetworkSnapshot
pub fn snapshot( &self, version: u64, provenance: impl Into<String>, ) -> NetworkSnapshot
Captures the current network as an immutable versioned snapshot.
Sourcepub fn structural_diff(&self, other: &Self) -> StructuralDiff
pub fn structural_diff(&self, other: &Self) -> StructuralDiff
Computes changed, added, and removed link ids against another network.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn insert_source_token(&mut self, language: &str, text: &str) -> LinkId
pub fn insert_source_token(&mut self, language: &str, text: &str) -> LinkId
Inserts a source token that can be rendered without an original source span.
This is the construction-side counterpart to parser-created token links: the token text is stored in the link term, but no byte range is required.
Sourcepub fn insert_syntax_node<const N: usize>(
&mut self,
language: &str,
kind: &str,
children: [LinkId; N],
) -> LinkId
pub fn insert_syntax_node<const N: usize>( &mut self, language: &str, kind: &str, children: [LinkId; N], ) -> LinkId
Inserts a syntax node whose ordered references are renderable children.
The kind should match the grammar node vocabulary used by the
corresponding parser where possible. Rendering only emits descendant
token text; the kind is metadata for queries and round-trip validation.
Sourcepub fn render_source(&self, language: &str) -> String
pub fn render_source(&self, language: &str) -> String
Renders source text for language from a parsed or constructed network.
Parsed networks are rendered from their document root. Hand-built
networks without document links are rendered from top-level syntax or
token links whose metadata language matches language.
Sourcepub fn render_source_from(&self, root: LinkId, language: &str) -> String
pub fn render_source_from(&self, root: LinkId, language: &str) -> String
Renders source text from a specific syntax, document, region, or token link.
Sourcepub fn render_source_from_document(&self, language: &str) -> Option<String>
pub fn render_source_from_document(&self, language: &str) -> Option<String>
Renders source text from document links matching language.
Returns None when the network has no matching document link, which is
common for programmatically constructed syntax fragments.
Source§impl LinkNetwork
impl LinkNetwork
Sourcepub fn find(&self, query: &LinkQuery) -> Vec<QueryMatch>
pub fn find(&self, query: &LinkQuery) -> Vec<QueryMatch>
Finds query matches using the transform surface’s source-text predicates.
This delegates structural matching to LinkQuery’s S-expression
matcher. Built-in predicates such as #eq? @capture "text" compare the
text reconstructed from captured token links.
Sourcepub fn replace(
&mut self,
matches: &[QueryMatch],
rule: &ReplacementRule,
) -> ReplacementReport
pub fn replace( &mut self, matches: &[QueryMatch], rule: &ReplacementRule, ) -> ReplacementReport
Applies a replacement rule to links selected by LinkNetwork::find.
Sourcepub fn replace_with_profile(
&mut self,
matches: &[QueryMatch],
rule: &ReplacementRule,
profile: &LanguageProfile,
) -> ReplacementReport
pub fn replace_with_profile( &mut self, matches: &[QueryMatch], rule: &ReplacementRule, profile: &LanguageProfile, ) -> ReplacementReport
Applies a replacement only when the result stays inside a language profile.
The replacement is first evaluated on a cloned network. If the candidate
network validates against the profile, it is committed to self. If the
profile rejects it, self keeps its original source text and receives a
queryable language-profile:unsupported-feature diagnostic link.
Trait Implementations§
Source§impl Clone for LinkNetwork
impl Clone for LinkNetwork
Source§fn clone(&self) -> LinkNetwork
fn clone(&self) -> LinkNetwork
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LinkNetwork
impl Debug for LinkNetwork
Source§impl Default for LinkNetwork
impl Default for LinkNetwork
Source§fn default() -> LinkNetwork
fn default() -> LinkNetwork
Source§impl FluentNetworkApi for LinkNetwork
impl FluentNetworkApi for LinkNetwork
Source§fn into_network(self) -> LinkNetwork
fn into_network(self) -> LinkNetwork
self into the underlying network executor.Source§fn into_fluent(self) -> FluentPipeline
fn into_fluent(self) -> FluentPipeline
Source§impl From<LinkNetwork> for ReadOnlyNetwork
impl From<LinkNetwork> for ReadOnlyNetwork
Source§fn from(network: LinkNetwork) -> Self
fn from(network: LinkNetwork) -> Self
Source§impl LinkStore for LinkNetwork
impl LinkStore for LinkNetwork
Source§fn create(
&mut self,
references: &[LinkId],
metadata: LinkMetadata,
) -> Result<LinkId, StorageError>
fn create( &mut self, references: &[LinkId], metadata: LinkMetadata, ) -> Result<LinkId, StorageError>
Source§fn read(&self, id: LinkId) -> Result<Option<Link>, StorageError>
fn read(&self, id: LinkId) -> Result<Option<Link>, StorageError>
Source§fn update(
&mut self,
id: LinkId,
references: &[LinkId],
metadata: LinkMetadata,
) -> Result<bool, StorageError>
fn update( &mut self, id: LinkId, references: &[LinkId], metadata: LinkMetadata, ) -> Result<bool, StorageError>
Source§fn delete(&mut self, id: LinkId) -> Result<bool, StorageError>
fn delete(&mut self, id: LinkId) -> Result<bool, StorageError>
Source§fn search(&self, query: &LinkStoreQuery) -> Result<Vec<Link>, StorageError>
fn search(&self, query: &LinkStoreQuery) -> Result<Vec<Link>, StorageError>
query. Read moreSource§fn count(&self, query: &LinkStoreQuery) -> Result<usize, StorageError>
fn count(&self, query: &LinkStoreQuery) -> Result<usize, StorageError>
query. Read moreSource§impl PartialEq for LinkNetwork
impl PartialEq for LinkNetwork
impl Eq for LinkNetwork
impl StructuralPartialEq for LinkNetwork
Auto Trait Implementations§
impl Freeze for LinkNetwork
impl RefUnwindSafe for LinkNetwork
impl Send for LinkNetwork
impl Sync for LinkNetwork
impl Unpin for LinkNetwork
impl UnsafeUnpin for LinkNetwork
impl UnwindSafe for LinkNetwork
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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