pub struct ContextFragment {
pub id: String,
pub text: String,
pub stable: bool,
pub priority: i32,
pub source: Option<String>,
pub metadata: Metadata,
}Fields§
§id: String§text: String§stable: bool§priority: i32§source: Option<String>§metadata: MetadataImplementations§
Source§impl ContextFragment
impl ContextFragment
pub fn new(id: impl Into<String>, text: impl Into<String>) -> Self
pub fn stable(self, stable: bool) -> Self
pub fn priority(self, priority: i32) -> Self
pub fn source(self, source: impl Into<String>) -> Self
pub fn cache_hint(self, cache_hint: impl Into<String>) -> Self
pub fn metadata(self, key: impl Into<String>, value: Value) -> Self
Trait Implementations§
Source§impl Clone for ContextFragment
impl Clone for ContextFragment
Source§fn clone(&self) -> ContextFragment
fn clone(&self) -> ContextFragment
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 ContextFragment
impl Debug for ContextFragment
Source§impl PartialEq for ContextFragment
impl PartialEq for ContextFragment
Source§fn eq(&self, other: &ContextFragment) -> bool
fn eq(&self, other: &ContextFragment) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContextFragment
Auto Trait Implementations§
impl Freeze for ContextFragment
impl RefUnwindSafe for ContextFragment
impl Send for ContextFragment
impl Sync for ContextFragment
impl Unpin for ContextFragment
impl UnsafeUnpin for ContextFragment
impl UnwindSafe for ContextFragment
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
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> 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 moreCreates a shared type from an unshared type.