Struct tantivy::DocAddress
source · pub struct DocAddress {
pub segment_ord: SegmentOrdinal,
pub doc_id: DocId,
}
Expand description
DocAddress
contains all the necessary information
to identify a document given a Searcher
object.
It consists of an id identifying its segment, and
a segment-local DocId
.
The id used for the segment is actually an ordinal
in the list of Segment
s held by a Searcher
.
Fields§
§segment_ord: SegmentOrdinal
The segment ordinal id that identifies the segment
hosting the document in the Searcher
it is called from.
doc_id: DocId
The segment-local DocId
.
Implementations§
source§impl DocAddress
impl DocAddress
sourcepub fn new(segment_ord: SegmentOrdinal, doc_id: DocId) -> DocAddress
pub fn new(segment_ord: SegmentOrdinal, doc_id: DocId) -> DocAddress
Creates a new DocAddress from the segment/docId pair.
Trait Implementations§
source§impl Clone for DocAddress
impl Clone for DocAddress
source§fn clone(&self) -> DocAddress
fn clone(&self) -> DocAddress
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DocAddress
impl Debug for DocAddress
source§impl<'de> Deserialize<'de> for DocAddress
impl<'de> Deserialize<'de> for DocAddress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for DocAddress
impl Hash for DocAddress
source§impl Ord for DocAddress
impl Ord for DocAddress
source§fn cmp(&self, other: &DocAddress) -> Ordering
fn cmp(&self, other: &DocAddress) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for DocAddress
impl PartialEq for DocAddress
source§fn eq(&self, other: &DocAddress) -> bool
fn eq(&self, other: &DocAddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for DocAddress
impl PartialOrd for DocAddress
source§fn partial_cmp(&self, other: &DocAddress) -> Option<Ordering>
fn partial_cmp(&self, other: &DocAddress) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for DocAddress
impl Serialize for DocAddress
impl Copy for DocAddress
impl Eq for DocAddress
impl StructuralPartialEq for DocAddress
Auto Trait Implementations§
impl Freeze for DocAddress
impl RefUnwindSafe for DocAddress
impl Send for DocAddress
impl Sync for DocAddress
impl Unpin for DocAddress
impl UnwindSafe for DocAddress
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.