pub struct NodeData { /* private fields */ }Expand description
The attributes of one node, as of the instant the graph was loaded.
Fields are private for the reason given on Subgraph; content is the
one whose type is expected to move.
Implementations§
Source§impl NodeData
impl NodeData
Sourcepub fn new(
title: impl Into<String>,
valid_from: impl Into<String>,
valid_to: impl Into<String>,
) -> Self
pub fn new( title: impl Into<String>, valid_from: impl Into<String>, valid_to: impl Into<String>, ) -> Self
A node with no content and no embedding model — what the default load
produces. Use Self::with_content and Self::with_embedding_model
to add either.
pub fn with_content(self, content: impl Into<String>) -> Self
pub fn with_embedding_model(self, model: Option<String>) -> Self
pub fn title(&self) -> &str
Sourcepub fn content(&self) -> Option<&str>
pub fn content(&self) -> Option<&str>
The document text, or None when it was not requested.
None is not an empty document. See the field’s own note: the
default load does not fetch content, so a caller that did not ask gets
None and can tell that apart from a concept whose content really is
"".
pub fn embedding_model(&self) -> Option<&str>
pub fn valid_from(&self) -> &str
pub fn valid_to(&self) -> &str
Trait Implementations§
impl StructuralPartialEq for NodeData
Auto Trait Implementations§
impl Freeze for NodeData
impl RefUnwindSafe for NodeData
impl Send for NodeData
impl Sync for NodeData
impl Unpin for NodeData
impl UnsafeUnpin for NodeData
impl UnwindSafe for NodeData
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<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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request