Skip to main content

BindIdentity

Struct BindIdentity 

Source
#[non_exhaustive]
pub struct BindIdentity { pub harness: String, pub session: String, pub build_class: Option<String>, }
Expand description

Per-route bind identity shared by client-facing and module-facing control.

Every field here is client-supplied and unattested. Use these claims for attribution, never authorization; gate on the daemon-stamped Principal instead.

Protocol 0.34 identities carry no project fields. For project-free openers, project attribution comes from the admitted session scope::ScopeStamp’s workdir and optional project_id; without these fields there is no project attribution. During migration, daemon 0.39 also accepts legacy opener project fields and prefers the legacy root over the scope workdir for internal root attribution and compatibility bind fields. Decoding remains lenient so readers can ignore project fields sent by older daemons during migration. See scope::BIND_NO_PROJECT_CAPABILITY for target opt-in to project-free bind identities.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§harness: String§session: String§build_class: Option<String>

The opener’s claim about the kind of build it is, sent on route.open. BUILD_CLASS_PRODUCTION marks a production build whose integrity the opener has verified.

Like every other field here it is unattested. The daemon recognizes callosum as the caller module ID eligible for this claim. It honours the claim only when the opener’s principal is Reserved { module_id: "callosum" }, and only the exact value BUILD_CLASS_PRODUCTION; any other value counts as absent. From any other opener it is ignored. The daemon never relays it to the target module: the identity on route.bind never carries it.

An absent build-class claim is omitted from the wire. A reader that predates this field drops it, which grants nothing. Set it on the public field after BindIdentity::new.

Implementations§

Source§

impl BindIdentity

Source

pub fn new(harness: impl Into<String>, session: impl Into<String>) -> Self

Constructs a project-free attribution identity.

Use this instead of a struct literal so future additive identity fields do not force construction-site migrations across the fleet.

Trait Implementations§

Source§

impl Clone for BindIdentity

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for BindIdentity

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for BindIdentity

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for BindIdentity

Source§

impl PartialEq for BindIdentity

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for BindIdentity

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for BindIdentity

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.