pub struct GlassCapabilityManifest {
pub protocol_version: u32,
pub glass_version: String,
pub schemas: BTreeMap<String, Vec<u32>>,
pub capabilities: BTreeMap<String, bool>,
pub capability_statuses: BTreeMap<String, GlassCapabilityStatus>,
pub constraints: GlassCapabilityConstraints,
}Expand description
A bounded, machine-readable description of one Glass runtime.
This is discovery output. It intentionally describes the complete runtime
inventory and is kept separate from NegotiatedCapabilities, which is the
contract a client may rely on after initialization.
Fields§
§protocol_version: u32§glass_version: String§schemas: BTreeMap<String, Vec<u32>>§capabilities: BTreeMap<String, bool>§capability_statuses: BTreeMap<String, GlassCapabilityStatus>§constraints: GlassCapabilityConstraintsImplementations§
Source§impl GlassCapabilityManifest
impl GlassCapabilityManifest
Sourcepub fn validate(&self) -> Result<(), CapabilityNegotiationError>
pub fn validate(&self) -> Result<(), CapabilityNegotiationError>
Reject impossible capability boolean/status combinations.
Source§impl GlassCapabilityManifest
impl GlassCapabilityManifest
Sourcepub fn for_policy(policy: &BrowserPolicy) -> Self
pub fn for_policy(policy: &BrowserPolicy) -> Self
Build the manifest for the current binary and policy.
Sourcepub fn for_policy_in_mode(policy: &BrowserPolicy, local_daemon: bool) -> Self
pub fn for_policy_in_mode(policy: &BrowserPolicy, local_daemon: bool) -> Self
Build a manifest for an explicit runtime mode.
Sourcepub fn for_policy_with_experimental_extensions(
policy: &BrowserPolicy,
experimental_extensions: bool,
) -> Self
pub fn for_policy_with_experimental_extensions( policy: &BrowserPolicy, experimental_extensions: bool, ) -> Self
Build a manifest with an explicit experimental extension opt-in.
Sourcepub fn for_policy_in_mode_with_experimental_extensions(
policy: &BrowserPolicy,
local_daemon: bool,
experimental_extensions: bool,
) -> Self
pub fn for_policy_in_mode_with_experimental_extensions( policy: &BrowserPolicy, local_daemon: bool, experimental_extensions: bool, ) -> Self
Build a manifest for an explicit runtime mode and extension opt-in.
Sourcepub fn negotiate(
&self,
request: Option<&Value>,
) -> Result<NegotiatedCapabilities, CapabilityNegotiationError>
pub fn negotiate( &self, request: Option<&Value>, ) -> Result<NegotiatedCapabilities, CapabilityNegotiationError>
Negotiate a bounded, immutable agreement against this manifest.
None retains backwards-compatible discovery semantics by agreeing to
the server’s complete inventory. A request selects exact schema
versions and may require or optionally accept named capabilities.
Trait Implementations§
Source§impl Clone for GlassCapabilityManifest
impl Clone for GlassCapabilityManifest
Source§fn clone(&self) -> GlassCapabilityManifest
fn clone(&self) -> GlassCapabilityManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GlassCapabilityManifest
impl Debug for GlassCapabilityManifest
Source§impl<'de> Deserialize<'de> for GlassCapabilityManifest
impl<'de> Deserialize<'de> for GlassCapabilityManifest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for GlassCapabilityManifest
Source§impl PartialEq for GlassCapabilityManifest
impl PartialEq for GlassCapabilityManifest
Source§impl Serialize for GlassCapabilityManifest
impl Serialize for GlassCapabilityManifest
impl StructuralPartialEq for GlassCapabilityManifest
Auto Trait Implementations§
impl Freeze for GlassCapabilityManifest
impl RefUnwindSafe for GlassCapabilityManifest
impl Send for GlassCapabilityManifest
impl Sync for GlassCapabilityManifest
impl Unpin for GlassCapabilityManifest
impl UnsafeUnpin for GlassCapabilityManifest
impl UnwindSafe for GlassCapabilityManifest
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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