Struct openstack::compute::ServerQuery
[−]
[src]
pub struct ServerQuery<'session> { /* fields omitted */ }
A query to server list.
Methods
impl<'session> ServerQuery<'session>
[src]
fn with_marker<T: Into<String>>(self, marker: T) -> Self
[src]
Add marker to the request.
Using this disables automatic pagination.
fn with_limit(self, limit: usize) -> Self
[src]
Add limit to the request.
Using this disables automatic pagination.
fn sort_by(self, sort: Sort<ServerSortKey>) -> Self
[src]
Add sorting to the request.
fn with_access_ip_v4(self, value: Ipv4Addr) -> Self
[src]
Filter by IPv4 address that should be used to access the server.
fn with_access_ip_v6(self, value: Ipv6Addr) -> Self
[src]
Filter by IPv6 address that should be used to access the server.
fn with_availability_zone<T: Into<String>>(self, value: T) -> Self
[src]
Filter by availability zone.
fn with_flavor<T: ToFlavorId>(self, value: T) -> Self
[src]
Filter by flavor.
fn with_hostname<T: Into<String>>(self, value: T) -> Self
[src]
Filter by host name.
fn with_image<T: ToImageId>(self, value: T) -> Self
[src]
Filter by image ID.
fn with_ip_v4(self, value: Ipv4Addr) -> Self
[src]
Filter by an IPv4 address.
fn with_ip_v6(self, value: Ipv6Addr) -> Self
[src]
Filter by an IPv6 address.
fn with_name<T: Into<String>>(self, value: T) -> Self
[src]
Filter by server name (a database regular expression).
fn with_power_state<T: Into<String>>(self, value: T) -> Self
[src]
Filter by power state.
fn with_project_id<T: Into<String>>(self, value: T) -> Self
[src]
Filter by project ID (also commonly known as tenant ID).
fn with_status<T: Into<String>>(self, value: T) -> Self
[src]
Filter by server status.
fn with_user_id<T: Into<String>>(self, value: T) -> Self
[src]
Filter by user ID.
fn into_iter(self) -> ResourceIterator<'session, ServerSummary<'session>>
[src]
Convert this query into an iterator executing the request.
This iterator yields only ServerSummary
objects, containing
IDs and names. Use into_iter_detailed
for full Server
objects.
Returns a FallibleIterator
, which is an iterator with each next
call returning a Result
.
Note that no requests are done until you start iterating.
fn into_iter_detailed(self) -> ResourceIterator<'session, Server<'session>>
[src]
Convert this query into an iterator executing the request.
This iterator yields full Server
objects. If you only need IDs
and/or names, use into_iter
to save bandwidth.
Returns a FallibleIterator
, which is an iterator with each next
call returning a Result
.
Note that no requests are done until you start iterating.
fn all(self) -> Result<Vec<ServerSummary<'session>>>
[src]
Execute this request and return all results.
A convenience shortcut for self.into_iter().collect()
.
fn one(self) -> Result<ServerSummary<'session>>
[src]
Return one and exactly one result.
Fails with ResourceNotFound
if the query produces no results and
with TooManyItems
if the query produces more than one result.
Trait Implementations
impl<'session> Clone for ServerQuery<'session>
[src]
fn clone(&self) -> ServerQuery<'session>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'session> Debug for ServerQuery<'session>
[src]
impl<'session> IntoFallibleIterator for ServerQuery<'session>
[src]
type Item = ServerSummary<'session>
The elements of the iterator.
type Error = Error
The error value of the iterator.
type IntoIter = ResourceIterator<'session, ServerSummary<'session>>
The iterator.
fn into_fallible_iterator(
self
) -> ResourceIterator<'session, ServerSummary<'session>>
[src]
self
) -> ResourceIterator<'session, ServerSummary<'session>>
Creates a fallible iterator from a value.