pub struct ProviderSchemaFragment { /* private fields */ }Expand description
Schema fragment returned by a provider for one resource/path lookup.
Implementations§
Source§impl ProviderSchemaFragment
impl ProviderSchemaFragment
Sourcepub fn with_source(self, source: ProviderSchemaSource) -> Self
pub fn with_source(self, source: ProviderSchemaSource) -> Self
Attaches source ownership using the materialized schema as its definition root.
Sourcepub fn with_source_definition_schema(
self,
source: ProviderSchemaSource,
source_schema: Value,
definition_schema: Value,
) -> Self
pub fn with_source_definition_schema( self, source: ProviderSchemaSource, source_schema: Value, definition_schema: Value, ) -> Self
Attaches explicit source-document and definition-root schemas.
Sourcepub fn with_required_in_parent(self, required_in_parent: bool) -> Self
pub fn with_required_in_parent(self, required_in_parent: bool) -> Self
Records whether the fragment’s field is required by its parent schema.
Sourcepub fn required_in_parent(&self) -> bool
pub fn required_in_parent(&self) -> bool
Reports whether the fragment’s field is required by its parent schema.
Sourcepub fn source(&self) -> Option<&ProviderSchemaSource>
pub fn source(&self) -> Option<&ProviderSchemaSource>
Returns source ownership when the fragment still maps to a provider leaf.
Sourcepub fn into_schema(self) -> Value
pub fn into_schema(self) -> Value
Consumes the fragment and returns its materialized schema.
Sourcepub fn into_source_parts(self) -> (Value, Option<ProviderSourceFragment>)
pub fn into_source_parts(self) -> (Value, Option<ProviderSourceFragment>)
Consumes the fragment into its schema and optional provider-owned source leaf.
Trait Implementations§
Source§impl Clone for ProviderSchemaFragment
impl Clone for ProviderSchemaFragment
Source§fn clone(&self) -> ProviderSchemaFragment
fn clone(&self) -> ProviderSchemaFragment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProviderSchemaFragment
impl Debug for ProviderSchemaFragment
Source§impl From<Value> for ProviderSchemaFragment
impl From<Value> for ProviderSchemaFragment
Source§impl PartialEq for ProviderSchemaFragment
impl PartialEq for ProviderSchemaFragment
impl StructuralPartialEq for ProviderSchemaFragment
Auto Trait Implementations§
impl Freeze for ProviderSchemaFragment
impl RefUnwindSafe for ProviderSchemaFragment
impl Send for ProviderSchemaFragment
impl Sync for ProviderSchemaFragment
impl Unpin for ProviderSchemaFragment
impl UnsafeUnpin for ProviderSchemaFragment
impl UnwindSafe for ProviderSchemaFragment
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