pub struct MatrixAdapterBuilder { /* private fields */ }Expand description
Builds a MatrixAdapter.
Implementations§
Source§impl MatrixAdapterBuilder
impl MatrixAdapterBuilder
Sourcepub fn user_id(self, user_id: impl Into<String>) -> Self
pub fn user_id(self, user_id: impl Into<String>) -> Self
The account’s user id, such as @agents:example.org; asked of the homeserver
(/account/whoami) when the adapter starts when not set.
Sourcepub fn poll_timeout(self, timeout: Duration) -> Self
pub fn poll_timeout(self, timeout: Duration) -> Self
How long one /sync waits for an event, at least a second; defaults to 25 s.
Sourcepub fn utc_offset(self, offset: FixedOffset) -> Self
pub fn utc_offset(self, offset: FixedOffset) -> Self
Shows every time — “since 18:00”, “07:31”, a pairing code’s “before 08:31” — at
offset east of UTC instead of in the host’s time zone.
Sourcepub fn approvals(self, approvals: Arc<dyn ApprovalService>) -> Self
pub fn approvals(self, approvals: Arc<dyn ApprovalService>) -> Self
Reads each card’s decision from approvals, the kernel’s approval service, so the
card is headed by the call in plain words — “Write file”, “Send email” — with a
summary an approval route wrote under it (spec 3.3 §7.1, §8). Without it, a card
is headed by the kernel’s masked summary.
Sourcepub fn answer_log(self, log: Arc<dyn AnswerLog>) -> Self
pub fn answer_log(self, log: Arc<dyn AnswerLog>) -> Self
Records each answer given in Matrix in log, the engine’s AnswerLog, so every
other surface shows “You said yes in Matrix at 07:31” (spec 3.3 §8.1). Give the log
the engine was built with.
Sourcepub fn audit(self, trail: AuditTrail) -> Self
pub fn audit(self, trail: AuditTrail) -> Self
Writes a surface.decide record of each answer given in Matrix to trail, the
engine’s audit trail, so an AuditAnswerLog over the same
store finds how it was given after a restart (spec 3.3 §11).
Sourcepub fn card_hints(self, hints: Arc<dyn CardHints>) -> Self
pub fn card_hints(self, hints: Arc<dyn CardHints>) -> Self
Sourcepub fn build(self) -> Result<MatrixAdapter>
pub fn build(self) -> Result<MatrixAdapter>
The adapter.
§Errors
Returns surface.invalid for an empty or malformed token, or a homeserver address
that is not https (or http on loopback).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MatrixAdapterBuilder
impl !UnwindSafe for MatrixAdapterBuilder
impl Forget for MatrixAdapterBuilder
impl Freeze for MatrixAdapterBuilderwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<dyn ApprovalService> is !null: Freeze,
PhantomData<ArcInner<dyn ApprovalService>>: Freeze,
*const ArcInner<dyn AnswerLog> is !null: Freeze,
PhantomData<ArcInner<dyn AnswerLog>>: Freeze,
*const ArcInner<dyn AuditRecorder> is !null: Freeze,
PhantomData<ArcInner<dyn AuditRecorder>>: Freeze,
PhantomData<Arc<dyn CardHints>>: Freeze,
impl Move for MatrixAdapterBuilder
impl Send for MatrixAdapterBuilder
impl Sync for MatrixAdapterBuilder
impl Unpin for MatrixAdapterBuilder
impl UnsafeUnpin for MatrixAdapterBuilderwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<dyn ApprovalService> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ApprovalService>>: UnsafeUnpin,
*const ArcInner<dyn AnswerLog> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn AnswerLog>>: UnsafeUnpin,
*const ArcInner<dyn AuditRecorder> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn AuditRecorder>>: UnsafeUnpin,
PhantomData<Arc<dyn CardHints>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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> ⓘ
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