pub struct Reader { /* private fields */ }Expand description
One document’s view of the person’s dictionary. Revoking it makes every clone fail, as the session does when it replaces the document a recognizer was reading.
Implementations§
Source§impl Reader
impl Reader
pub fn bind(source: Arc<dyn SettingsSource>) -> Self
pub fn revoke(&self)
Sourcepub fn same_binding(&self, other: &Self) -> bool
pub fn same_binding(&self, other: &Self) -> bool
Whether other reads the same document: two readers of it stay interchangeable while the
words change.
Sourcepub fn reads(&self, source: &Arc<dyn SettingsSource>) -> bool
pub fn reads(&self, source: &Arc<dyn SettingsSource>) -> bool
Whether this reader reads source.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Reader
impl !UnwindSafe for Reader
impl Forget for Reader
impl Freeze for Readerwhere
*const ArcInner<dyn SettingsSource> is !null: Freeze,
PhantomData<ArcInner<dyn SettingsSource>>: Freeze,
*const ArcInner<Atomic<bool>> is !null: Freeze,
PhantomData<ArcInner<Atomic<bool>>>: Freeze,
impl Move for Reader
impl Send for Reader
impl Sync for Reader
impl Unpin for Reader
impl UnsafeUnpin for Readerwhere
*const ArcInner<dyn SettingsSource> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn SettingsSource>>: UnsafeUnpin,
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
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 more