pub struct FieldMeta {
pub field_id: FieldId,
pub field_name: String,
pub field_type: FieldType,
pub flags: u8,
}Expand description
Per-field metadata stored in the segment header.
Fields§
§field_id: FieldId§field_name: String§field_type: FieldType§flags: u8Implementations§
Source§impl FieldMeta
impl FieldMeta
pub fn new( field_id: FieldId, field_name: String, field_type: FieldType, stored: bool, indexed: bool, doc_values: bool, norms: bool, ) -> Self
pub fn is_stored(&self) -> bool
pub fn is_indexed(&self) -> bool
pub fn has_doc_values(&self) -> bool
pub fn has_norms(&self) -> bool
Sourcepub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Serialize to bytes: [field_id: u16][name_len: u16][name_bytes][type: u8][flags: u8]
Sourcepub fn from_bytes(data: &[u8]) -> Result<(Self, usize)>
pub fn from_bytes(data: &[u8]) -> Result<(Self, usize)>
Deserialize from bytes. Returns (FieldMeta, bytes_consumed).
Trait Implementations§
impl Eq for FieldMeta
impl StructuralPartialEq for FieldMeta
Auto Trait Implementations§
impl Freeze for FieldMeta
impl RefUnwindSafe for FieldMeta
impl Send for FieldMeta
impl Sync for FieldMeta
impl Unpin for FieldMeta
impl UnsafeUnpin for FieldMeta
impl UnwindSafe for FieldMeta
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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