pub enum Filter<'a, S: AsRef<str>> {
None,
By(&'a [S]),
}Expand description
Filter based on Target as specified for various items.
Please note: This does only filter based on what is stored in the target field of an item
(e.g., ProgramRequest::targets) and should not get interpreted by the server.
Unfortunately, the specification is not very clear about this behavior, so some servers might interpret it differently. There has been some discussion with the authors of the standard in https://github.com/oadr3-org/openadr3-vtn-reference-implementation/issues/83 (sadly not public).
Variants§
None
Do not apply any filtering
By(&'a [S])
Filter a list of Target.
It will be encoded to the request as query parameters,
e.g., /programs?targets=group-1&targets=group-2.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> Freeze for Filter<'a, S>
impl<'a, S> RefUnwindSafe for Filter<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for Filter<'a, S>where
S: Sync,
impl<'a, S> Sync for Filter<'a, S>where
S: Sync,
impl<'a, S> Unpin for Filter<'a, S>
impl<'a, S> UnsafeUnpin for Filter<'a, S>
impl<'a, S> UnwindSafe for Filter<'a, S>where
S: RefUnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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