pub struct ModelGroupDef {
pub name: Option<NameId>,
pub target_namespace: Option<NameId>,
pub source: Option<SourceRef>,
pub compositor: Compositor,
pub particles: Vec<ContentParticle>,
pub id: Option<String>,
}Expand description
Named model group definition (xs:group)
Represents a reusable content model that can be referenced by complex types.
Fields§
§name: Option<NameId>Group name (required for global groups)
target_namespace: Option<NameId>Target namespace
source: Option<SourceRef>Source location for error reporting
compositor: CompositorThe compositor (sequence, choice, or all)
particles: Vec<ContentParticle>Child particles
id: Option<String>ID attribute value
Implementations§
Source§impl ModelGroupDef
impl ModelGroupDef
Sourcepub fn new(name: NameId, compositor: Compositor) -> Self
pub fn new(name: NameId, compositor: Compositor) -> Self
Create a new named model group
Sourcepub fn anonymous(compositor: Compositor) -> Self
pub fn anonymous(compositor: Compositor) -> Self
Create a new anonymous model group
Sourcepub fn add_particle(&mut self, particle: ContentParticle)
pub fn add_particle(&mut self, particle: ContentParticle)
Add a particle to this group
Trait Implementations§
Source§impl Clone for ModelGroupDef
impl Clone for ModelGroupDef
Source§fn clone(&self) -> ModelGroupDef
fn clone(&self) -> ModelGroupDef
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 moreAuto Trait Implementations§
impl Freeze for ModelGroupDef
impl RefUnwindSafe for ModelGroupDef
impl Send for ModelGroupDef
impl Sync for ModelGroupDef
impl Unpin for ModelGroupDef
impl UnsafeUnpin for ModelGroupDef
impl UnwindSafe for ModelGroupDef
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