pub enum RealmBuilderError {
Show 22 variants
    ChildAlreadyExists,
    InvalidManifestExtension,
    InvalidComponentDecl,
    NoSuchChild,
    ChildDeclNotVisible,
    NoSuchSource,
    NoSuchTarget,
    CapabilitiesEmpty,
    TargetsEmpty,
    SourceAndTargetMatch,
    DeclNotFound,
    DeclReadError,
    BuildAlreadyCalled,
    CapabilityInvalid,
    InvalidChildRealmHandle,
    ImmutableProgram,
    UrlIsNotRelative,
    InvalidPkgDirHandle,
    NoConfigSchema,
    NoSuchConfigField,
    ConfigValueInvalid,
    ConfigOverrideUnsupported,
    // some variants omitted
}Expand description
Errors that may be returned by the Realm and Builder protocols.
Variants§
ChildAlreadyExists
Child cannot be added to the realm, as there is already a child in the realm with that name.
InvalidManifestExtension
A legacy component URL was given to AddChild, or a modern component
url was given to AddLegacyChild.
InvalidComponentDecl
A component declaration failed validation.
NoSuchChild
The referenced child does not exist.
ChildDeclNotVisible
The component declaration for the referenced child cannot be viewed nor manipulated by RealmBuilder, because the child was added to the realm using an URL that was neither a fragment-only nor a legacy URL.
NoSuchSource
The source does not exist.
NoSuchTarget
A target does not exist.
CapabilitiesEmpty
The capabilities field is empty.
TargetsEmpty
The targets field is empty.
SourceAndTargetMatch
The from value is equal to one of the elements in to.
DeclNotFound
The test package does not contain the component declaration referenced by a fragment-only component URL.
DeclReadError
Encountered an I/O error when attempting to read a component declaration referenced by a fragment-only component URL from the test package.
BuildAlreadyCalled
The Build function has been called multiple times on this channel.
CapabilityInvalid
A capability is invalid. This may occur if a required field is empty or if an unsupported type is received.
InvalidChildRealmHandle
The handle the client provided for the child realm is not usable.
ImmutableProgram
ReplaceComponentDecl was called on a legacy or local component with a
program declaration that did not match the one from the old component
declaration. This could render a legacy or local component
non-functional, and is disallowed.
UrlIsNotRelative
The URL provided to RealmBuilderFactory.CreateFromRelativeURL is not a
fragment-only component URL.
InvalidPkgDirHandle
The handle the client provided for the test’s pkg directory is not usable.
NoConfigSchema
The component does not have a config schema defined. Attempting to set a config value is not allowed.
NoSuchConfigField
The component’s config schema does not have a field with that name.
ConfigValueInvalid
A config value is invalid. This may mean a type mismatch or an issue with constraints like string/vector length.
ConfigOverrideUnsupported
A config value cannot be set because the realm has not chosen its override policy.
Implementations§
Source§impl RealmBuilderError
 
impl RealmBuilderError
pub fn from_primitive(prim: u32) -> Option<RealmBuilderError>
pub fn from_primitive_allow_unknown(prim: u32) -> RealmBuilderError
pub fn unknown() -> RealmBuilderError
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Clone for RealmBuilderError
 
impl Clone for RealmBuilderError
Source§fn clone(&self) -> RealmBuilderError
 
fn clone(&self) -> RealmBuilderError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RealmBuilderError
 
impl Debug for RealmBuilderError
Source§impl<D> Decode<RealmBuilderError, D> for RealmBuilderErrorwhere
    D: ResourceDialect,
 
impl<D> Decode<RealmBuilderError, D> for RealmBuilderErrorwhere
    D: ResourceDialect,
Source§fn new_empty() -> RealmBuilderError
 
fn new_empty() -> RealmBuilderError
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<RealmBuilderError, D> for RealmBuilderErrorwhere
    D: ResourceDialect,
 
impl<D> Encode<RealmBuilderError, D> for RealmBuilderErrorwhere
    D: ResourceDialect,
Source§impl Hash for RealmBuilderError
 
impl Hash for RealmBuilderError
Source§impl Ord for RealmBuilderError
 
impl Ord for RealmBuilderError
Source§fn cmp(&self, other: &RealmBuilderError) -> Ordering
 
fn cmp(&self, other: &RealmBuilderError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Source§impl PartialEq for RealmBuilderError
 
impl PartialEq for RealmBuilderError
Source§impl PartialOrd for RealmBuilderError
 
impl PartialOrd for RealmBuilderError
Source§impl TypeMarker for RealmBuilderError
 
impl TypeMarker for RealmBuilderError
Source§type Owned = RealmBuilderError
 
type Owned = RealmBuilderError
Source§fn inline_align(_context: Context) -> usize
 
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
 
fn inline_size(_context: Context) -> usize
inline_align.Source§fn encode_is_copy() -> bool
 
fn encode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
 
fn decode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl ValueTypeMarker for RealmBuilderError
 
impl ValueTypeMarker for RealmBuilderError
Source§type Borrowed<'a> = RealmBuilderError
 
type Borrowed<'a> = RealmBuilderError
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
    value: &<RealmBuilderError as TypeMarker>::Owned,
) -> <RealmBuilderError as ValueTypeMarker>::Borrowed<'_>
 
fn borrow( value: &<RealmBuilderError as TypeMarker>::Owned, ) -> <RealmBuilderError as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.