pub struct Target {
pub base_url: String,
pub business_logic: Option<Credential>,
pub ven: Option<Credential>,
pub ven_client_id: Option<String>,
}conformance only.Expand description
How to reach the VTN under test.
Fields§
§base_url: StringBase URL, including the base path.
business_logic: Option<Credential>A business-logic bearer token, or credentials to obtain one.
ven: Option<Credential>A VEN bearer token, or credentials to obtain one.
Without it every object-privacy check skips — and object privacy is the half of OpenADR 3.1 most worth measuring, so a run without VEN credentials is a much weaker run.
ven_client_id: Option<String>The clientID the VEN credential authenticates as.
The suite cannot discover it: a VTN maps a token to a clientID “by means not specified
here” [Def §VEN created object privacy]. Without it the checks that need business logic to
grant this VEN a target skip.
Implementations§
Source§impl Target
impl Target
Sourcepub fn new(base_url: impl Into<String>) -> Self
pub fn new(base_url: impl Into<String>) -> Self
A target with no credentials — enough for the unauthenticated checks and nothing else.
Sourcepub fn with_business_logic(self, credential: Credential) -> Self
pub fn with_business_logic(self, credential: Credential) -> Self
Set the business-logic credential.
Sourcepub fn with_ven(
self,
credential: Credential,
client_id: impl Into<String>,
) -> Self
pub fn with_ven( self, credential: Credential, client_id: impl Into<String>, ) -> Self
Set the VEN credential and the clientID it authenticates as.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Target
impl Freeze for Target
impl Move for Target
impl RefUnwindSafe for Target
impl Send for Targetwhere
RawVecInner: Send,
impl Sync for Targetwhere
RawVecInner: Sync,
impl Unpin for Target
impl UnsafeUnpin for Target
impl UnwindSafe for Targetwhere
RawVecInner: UnwindSafe,
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
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> ⓘ
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> ⓘ
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