pub struct ResourceBuilder { /* private fields */ }
Expand description
Builder type for a ResourceIdentifier
.
The methods build_resource_path
and build_qualified_id
are used to construct identifiers
with either the ‘/’ or ‘:’ separator between the collected components.
Implementations§
Source§impl ResourceBuilder
impl ResourceBuilder
Sourcepub fn named(id: Identifier) -> Self
pub fn named(id: Identifier) -> Self
Construct a new resource builder containing only the provided identifier.
Sourcepub fn typed(id: Identifier) -> Self
pub fn typed(id: Identifier) -> Self
Construct a new resource builder containing only the provided identifier.
Sourcepub fn add(&mut self, id: ResourceIdentifier) -> &mut Self
pub fn add(&mut self, id: ResourceIdentifier) -> &mut Self
Add the provided ResourceIdentifier
to the inner list of components.
Sourcepub fn qualified_name(&mut self, id: ResourceIdentifier) -> &mut Self
pub fn qualified_name(&mut self, id: ResourceIdentifier) -> &mut Self
Add the provided ResourceIdentifier
to the inner list of components.
Sourcepub fn resource_path(&mut self, id: ResourceIdentifier) -> &mut Self
pub fn resource_path(&mut self, id: ResourceIdentifier) -> &mut Self
Add the provided ResourceIdentifier
to the inner list of components.
Sourcepub fn type_name(&mut self, id: Identifier) -> &mut Self
pub fn type_name(&mut self, id: Identifier) -> &mut Self
Add the provided Identifier
to the inner list of components.
Sourcepub fn resource_name(&mut self, id: Identifier) -> &mut Self
pub fn resource_name(&mut self, id: Identifier) -> &mut Self
Add the provided Identifier
to the inner list of components.
Sourcepub fn sub_resource_name(&mut self, id: Identifier) -> &mut Self
pub fn sub_resource_name(&mut self, id: Identifier) -> &mut Self
Add the provided Identifier
to the inner list of components.
Sourcepub fn version(&mut self, v: u32) -> &mut Self
pub fn version(&mut self, v: u32) -> &mut Self
Add the provided integer version number to the inner list of components.
Sourcepub fn build_resource_path(&mut self) -> ResourceIdentifier
pub fn build_resource_path(&mut self) -> ResourceIdentifier
Return the iner list of components as a resource identifier path.
Sourcepub fn build_qualified_id(&mut self) -> ResourceIdentifier
pub fn build_qualified_id(&mut self) -> ResourceIdentifier
Return the iner list of components as a qualified resource identifier.
Trait Implementations§
Source§impl Clone for ResourceBuilder
impl Clone for ResourceBuilder
Source§fn clone(&self) -> ResourceBuilder
fn clone(&self) -> ResourceBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more