pub struct TurnPass { /* private fields */ }Expand description
What one run is handed to reach the server with: where the server is, and the credential minted for that run.
The credential is readable in exactly one place — Self::environment,
which is what a run’s environment is built from — and neither rendering of
this type shows it.
Implementations§
Source§impl TurnPass
impl TurnPass
Sourcepub fn new(
server: Option<SocketAddr>,
credential: String,
) -> Result<Self, SupervisorError>
pub fn new( server: Option<SocketAddr>, credential: String, ) -> Result<Self, SupervisorError>
One pass: the server’s address, when it is known, and a credential.
§Errors
Returns SupervisorError::Unavailable, quoting nothing of it, when the
credential is not one an Authorization header carries intact: empty,
or carrying anything but printable ASCII without a space.
Sourcepub fn environment(&self) -> Vec<(&'static str, String)>
pub fn environment(&self) -> Vec<(&'static str, String)>
The variables a run’s environment carries, as (name, value) pairs:
the server’s address, as a client spells it, when it is known, and the
credential.
Trait Implementations§
Auto Trait Implementations§
impl Forget for TurnPass
impl Freeze for TurnPass
impl Move for TurnPass
impl RefUnwindSafe for TurnPass
impl Send for TurnPass
impl Sync for TurnPass
impl Unpin for TurnPass
impl UnsafeUnpin for TurnPass
impl UnwindSafe for TurnPass
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