pub struct CodeAnchor {
pub path: String,
pub symbol: Option<String>,
pub digest: String,
pub lang: Option<String>,
}Expand description
The contract’s anchor (C0 1.9 CodeAnchorV1). The engine’s symbol names
are name, or name#n for the n-th definition of that name in a file,
and slug paths for Markdown sections (markdown_sections).
One code anchor.
Fields§
§path: StringRepo-relative, /-separated, NFC; no . or .. segment, no leading
or trailing /.
symbol: Option<String>Language-neutral qualified name from the code graph
(hive::policy::verify_bundle, AuthService.verify); the whole file
when absent.
digest: Stringsha256: + 64 lowercase hex over the normalized symbol span (or the
whole file without a symbol).
lang: Option<String>Tree-sitter language id, a hint only.
Implementations§
Source§impl CodeAnchorV1
impl CodeAnchorV1
pub fn validate(&self) -> Result<(), ValidationError>
Trait Implementations§
Source§impl Clone for CodeAnchorV1
impl Clone for CodeAnchorV1
Source§fn clone(&self) -> CodeAnchorV1
fn clone(&self) -> CodeAnchorV1
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 CodeAnchorV1
impl Debug for CodeAnchorV1
Source§impl<'de> Deserialize<'de> for CodeAnchorV1
impl<'de> Deserialize<'de> for CodeAnchorV1
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodeAnchorV1, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodeAnchorV1, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CodeAnchorV1
Source§impl Ord for CodeAnchorV1
impl Ord for CodeAnchorV1
Source§fn cmp(&self, other: &CodeAnchorV1) -> Ordering
fn cmp(&self, other: &CodeAnchorV1) -> 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 CodeAnchorV1
impl PartialEq for CodeAnchorV1
Source§impl PartialOrd for CodeAnchorV1
impl PartialOrd for CodeAnchorV1
Source§impl Serialize for CodeAnchorV1
impl Serialize for CodeAnchorV1
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CodeAnchorV1
Auto Trait Implementations§
impl Freeze for CodeAnchorV1
impl RefUnwindSafe for CodeAnchorV1
impl Send for CodeAnchorV1
impl Sync for CodeAnchorV1
impl Unpin for CodeAnchorV1
impl UnsafeUnpin for CodeAnchorV1
impl UnwindSafe for CodeAnchorV1
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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