pub struct Ctx;Expand description
The Ctx namespace — factory methods for declarative context builders.
Implementations§
Source§impl Ctx
impl Ctx
Sourcepub fn builder() -> SectionBuilder
pub fn builder() -> SectionBuilder
Start building a new context with the first section.
Returns a SectionBuilder — add fields, flags, sentiments,
then call .build() to get a ContextBuilder.
§Example
ⓘ
let ctx = Ctx::builder()
.section("Caller")
.field("caller_name", "Name")
.field("caller_organization", "Organization")
.flag("is_known_contact", "Known contact")
.section("Call")
.field("call_purpose", "Purpose")
.sentiment("caller_sentiment")
.build();Auto Trait Implementations§
impl Freeze for Ctx
impl RefUnwindSafe for Ctx
impl Send for Ctx
impl Sync for Ctx
impl Unpin for Ctx
impl UnwindSafe for Ctx
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