pub struct Query { /* private fields */ }Expand description
A structured RESO/OData query
Represents a complete OData query with all its parameters.
Use QueryBuilder to construct queries with a fluent API.
§Examples
// Direct construction (prefer QueryBuilder for fluent API)
let query = Query::new("Property");Implementations§
Source§impl Query
impl Query
Sourcepub fn new(resource: impl Into<String>) -> Self
pub fn new(resource: impl Into<String>) -> Self
Create a new query for a resource
Creates a basic query with no filters or parameters.
Use QueryBuilder for a more convenient fluent API.
§Examples
let query = Query::new("Property");Sourcepub fn to_odata_string(&self) -> String
pub fn to_odata_string(&self) -> String
Convert to OData query string
Generates the URL path and query parameters according to OData v4.0 specification.
§Examples
let query = QueryBuilder::new("Property")
.filter("City eq 'Austin'")
.top(10)
.build()?;
let url = query.to_odata_string();
// Returns: "Property?$filter=City%20eq%20%27Austin%27&$top=10"Trait Implementations§
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnwindSafe for Query
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