pub struct Ctx {
pub layout: RepoLayout,
pub layered: LayeredConfig,
pub relying_parties: Vec<RelyingParty>,
}Expand description
Everything a command needs before it does anything.
Fields§
§layout: RepoLayout§layered: LayeredConfig§relying_parties: Vec<RelyingParty>Implementations§
Source§impl Ctx
impl Ctx
Sourcepub fn load() -> Result<Self, u8>
pub fn load() -> Result<Self, u8>
Load the config. Works outside a repository: the layout then names the current directory and there is simply no repository config.
§Errors
The exit code, after printing the reason.
Sourcepub fn open_unsigned(&self, target: &Target) -> Result<ConnectTransport, String>
pub fn open_unsigned(&self, target: &Target) -> Result<ConnectTransport, String>
Open target with no ambient signing identity, for the unsigned
epoch RPCs. The credential-trust gate still applies.
§Errors
The message to print.
Sourcepub fn open_signed(&self, target: &Target) -> Result<ConnectTransport, String>
pub fn open_signed(&self, target: &Target) -> Result<ConnectTransport, String>
Open target with the ambient signing identity (needs
transport_auth = envelope and a trusted remote, like mkit push).
§Errors
The message to print.
Sourcepub fn read_epoch(
tx: &ConnectTransport,
namespace: &Namespace,
) -> Result<u64, String>
pub fn read_epoch( tx: &ConnectTransport, namespace: &Namespace, ) -> Result<u64, String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ctx
impl RefUnwindSafe for Ctx
impl Send for Ctx
impl Sync for Ctx
impl Unpin for Ctx
impl UnsafeUnpin for Ctx
impl UnwindSafe for Ctx
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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