pub struct LocationQueryBuilder { /* private fields */ }
Expand description
A builder for creating a location query with error checking.
Implementations§
Source§impl LocationQueryBuilder
impl LocationQueryBuilder
pub fn new() -> Self
Sourcepub fn segment<S: ToString>(self, segment: S) -> Self
pub fn segment<S: ToString>(self, segment: S) -> Self
Create a new location query builder. The segment must be 3 characters long and ASCII uppercase.
Sourcepub fn segment_index(self, index: usize) -> Self
pub fn segment_index(self, index: usize) -> Self
Set the segment index. This is optional. If not set, the segment index will not be included in the query. If set, the segment index must be greater than 0.
Sourcepub fn field(self, index: usize) -> Self
pub fn field(self, index: usize) -> Self
Set the field index. This is optional. If not set, the field index will not be included in the query. If set, the field index must be greater than 0.
Sourcepub fn repeat(self, index: usize) -> Self
pub fn repeat(self, index: usize) -> Self
Set the repeat index. This is optional. If not set, the repeat index will not be included in the query. If set, the repeat index must be greater than 0.
Sourcepub fn component(self, index: usize) -> Self
pub fn component(self, index: usize) -> Self
Set the component index. This is optional. If not set, the component index will not be included in the query. If set, the component index must be greater than 0.
Sourcepub fn subcomponent(self, index: usize) -> Self
pub fn subcomponent(self, index: usize) -> Self
Set the subcomponent index. This is optional. If not set, the subcomponent index will not be included in the query. If set, the subcomponent index must be greater than 0.
Sourcepub fn build(self) -> Result<LocationQuery, LocationQueryBuildError>
pub fn build(self) -> Result<LocationQuery, LocationQueryBuildError>
Build the location query
Trait Implementations§
Source§impl Clone for LocationQueryBuilder
impl Clone for LocationQueryBuilder
Source§fn clone(&self) -> LocationQueryBuilder
fn clone(&self) -> LocationQueryBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more