pub enum Index {
At(u8),
OutOfRange,
}Expand description
An index into a table, as a record carries it.
Variants§
Implementations§
Source§impl Index
impl Index
Sourcepub fn at(i: usize, max: u8) -> Index
pub fn at(i: usize, max: u8) -> Index
The place i of a table whose greatest index is max:
out_of_range above it, where a record has no code for the place.
Sourcepub fn to_json(self) -> Value
pub fn to_json(self) -> Value
Core §7.6’s JSON reading: the number, or the reserved code’s name.
Sourcepub fn of_json(v: &Value) -> Result<Index, WriteRefusal>
pub fn of_json(v: &Value) -> Result<Index, WriteRefusal>
Index::to_json read back.
§Errors
WriteRefusal::Range for a number that is no u8, and
WriteRefusal::Value for any other value.
Trait Implementations§
impl Copy for Index
impl Eq for Index
impl StructuralPartialEq for Index
Auto Trait Implementations§
impl Forget for Index
impl Freeze for Index
impl Move for Index
impl RefUnwindSafe for Index
impl Send for Index
impl Sync for Index
impl Unpin for Index
impl UnsafeUnpin for Index
impl UnwindSafe for Index
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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