pub enum ContentSelector {
Path {
path: NodePath,
},
Id {
id: NodeId,
},
}Expand description
One exact local owner in the document actually loaded for this operation.
Paths are snapshot-relative: after edits a still-valid path can denote a different owner. Neither variant provides cross-call stale detection.
Variants§
Path
Exact canonical structural path, including root and tldr path 0.
Id
Exact canonical content ID, not an authored fragment or semantic name.
Implementations§
Source§impl ContentSelector
impl ContentSelector
Sourcepub fn path(value: impl Into<NodePath>) -> Self
pub fn path(value: impl Into<NodePath>) -> Self
Select a trusted projected structural path. Public callers must validate user input before execution even when constructing the enum directly.
Sourcepub fn id(value: impl Into<NodeId>) -> Self
pub fn id(value: impl Into<NodeId>) -> Self
Select an exact content identity without resolving it.
Trait Implementations§
Source§impl Clone for ContentSelector
impl Clone for ContentSelector
Source§fn clone(&self) -> ContentSelector
fn clone(&self) -> ContentSelector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContentSelector
impl Debug for ContentSelector
Source§impl<'de> Deserialize<'de> for ContentSelector
impl<'de> Deserialize<'de> for ContentSelector
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ContentSelector
impl Display for ContentSelector
impl Eq for ContentSelector
Source§impl FromStr for ContentSelector
impl FromStr for ContentSelector
Source§impl Hash for ContentSelector
impl Hash for ContentSelector
Source§impl JsonSchema for ContentSelector
impl JsonSchema for ContentSelector
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for ContentSelector
impl Ord for ContentSelector
Source§fn cmp(&self, other: &ContentSelector) -> Ordering
fn cmp(&self, other: &ContentSelector) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ContentSelector
impl PartialEq for ContentSelector
Source§impl PartialOrd for ContentSelector
impl PartialOrd for ContentSelector
Source§impl Serialize for ContentSelector
impl Serialize for ContentSelector
impl StructuralPartialEq for ContentSelector
Auto Trait Implementations§
impl Freeze for ContentSelector
impl RefUnwindSafe for ContentSelector
impl Send for ContentSelector
impl Sync for ContentSelector
impl Unpin for ContentSelector
impl UnsafeUnpin for ContentSelector
impl UnwindSafe for ContentSelector
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