pub struct ReadOnlyTable { /* private fields */ }Expand description
Typed read-only access to one table in a fixed shard snapshot.
Implementations§
Source§impl ReadOnlyTable
impl ReadOnlyTable
Sourcepub fn open(db: Arc<ReadOnlyDb>, name: impl Into<String>) -> Result<Self>
pub fn open(db: Arc<ReadOnlyDb>, name: impl Into<String>) -> Result<Self>
Open a table from metadata stored in this snapshot’s schema.
Sourcepub fn schema(&self) -> &TableSchema
pub fn schema(&self) -> &TableSchema
Return the persisted semantic schema of this table.
Sourcepub fn key_builder(&self) -> TableKeyBuilder
pub fn key_builder(&self) -> TableKeyBuilder
Start building one primary key in schema order.
Sourcepub fn project_by_names<S: AsRef<str>>(
&self,
field_names: &[S],
) -> Result<TableProjection>
pub fn project_by_names<S: AsRef<str>>( &self, field_names: &[S], ) -> Result<TableProjection>
Compile a reusable read projection from top-level field names.
Auto Trait Implementations§
impl !RefUnwindSafe for ReadOnlyTable
impl !UnwindSafe for ReadOnlyTable
impl Freeze for ReadOnlyTable
impl Send for ReadOnlyTable
impl Sync for ReadOnlyTable
impl Unpin for ReadOnlyTable
impl UnsafeUnpin for ReadOnlyTable
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<T> ErasedDestructor for Twhere
T: 'static,
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