pub struct TypedStreamSpec<S> {
pub state_name: String,
pub identity: IdentitySpec,
pub handlers: Vec<TypedHandlerSpec<S>>,
pub sections: Vec<EntitySection>,
pub field_mappings: BTreeMap<String, FieldTypeInfo>,
pub resolver_hooks: Vec<ResolverHook>,
pub instruction_hooks: Vec<InstructionHook>,
pub computed_fields: Vec<String>,
/* private fields */
}Fields§
§state_name: String§identity: IdentitySpec§handlers: Vec<TypedHandlerSpec<S>>§sections: Vec<EntitySection>§field_mappings: BTreeMap<String, FieldTypeInfo>§resolver_hooks: Vec<ResolverHook>§instruction_hooks: Vec<InstructionHook>§computed_fields: Vec<String>Implementations§
Source§impl<S> TypedStreamSpec<S>
impl<S> TypedStreamSpec<S>
pub fn new( state_name: String, identity: IdentitySpec, handlers: Vec<TypedHandlerSpec<S>>, ) -> Self
Sourcepub fn with_type_info(
state_name: String,
identity: IdentitySpec,
handlers: Vec<TypedHandlerSpec<S>>,
sections: Vec<EntitySection>,
field_mappings: BTreeMap<String, FieldTypeInfo>,
) -> Self
pub fn with_type_info( state_name: String, identity: IdentitySpec, handlers: Vec<TypedHandlerSpec<S>>, sections: Vec<EntitySection>, field_mappings: BTreeMap<String, FieldTypeInfo>, ) -> Self
Enhanced constructor with type information
Sourcepub fn get_field_type(&self, path: &str) -> Option<&FieldTypeInfo>
pub fn get_field_type(&self, path: &str) -> Option<&FieldTypeInfo>
Get type information for a specific field path
Sourcepub fn get_section_fields(
&self,
section_name: &str,
) -> Option<&Vec<FieldTypeInfo>>
pub fn get_section_fields( &self, section_name: &str, ) -> Option<&Vec<FieldTypeInfo>>
Get all fields for a specific section
Sourcepub fn get_section_names(&self) -> Vec<&String>
pub fn get_section_names(&self) -> Vec<&String>
Get all section names
Sourcepub fn to_serializable(&self) -> SerializableStreamSpec
pub fn to_serializable(&self) -> SerializableStreamSpec
Convert to serializable format
Sourcepub fn from_serializable(spec: SerializableStreamSpec) -> Self
pub fn from_serializable(spec: SerializableStreamSpec) -> Self
Create from serializable format
Trait Implementations§
Source§impl<S: Clone> Clone for TypedStreamSpec<S>
impl<S: Clone> Clone for TypedStreamSpec<S>
Source§fn clone(&self) -> TypedStreamSpec<S>
fn clone(&self) -> TypedStreamSpec<S>
Returns a duplicate of the value. Read more
1.0.0 · 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<S> Freeze for TypedStreamSpec<S>
impl<S> RefUnwindSafe for TypedStreamSpec<S>where
S: RefUnwindSafe,
impl<S> Send for TypedStreamSpec<S>where
S: Send,
impl<S> Sync for TypedStreamSpec<S>where
S: Sync,
impl<S> Unpin for TypedStreamSpec<S>where
S: Unpin,
impl<S> UnwindSafe for TypedStreamSpec<S>where
S: UnwindSafe,
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