pub struct ScalarVariableContext<S> {
pub descriptor_index: usize,
pub entity_type_name: &'static str,
pub entity_count: fn(&S) -> usize,
pub variable_name: &'static str,
pub getter: fn(&S, usize) -> Option<usize>,
pub setter: fn(&mut S, usize, Option<usize>),
pub value_source: ValueSource<S>,
pub allows_unassigned: bool,
}Fields§
§descriptor_index: usize§entity_type_name: &'static str§entity_count: fn(&S) -> usize§variable_name: &'static str§getter: fn(&S, usize) -> Option<usize>§setter: fn(&mut S, usize, Option<usize>)§value_source: ValueSource<S>§allows_unassigned: boolImplementations§
Source§impl<S> ScalarVariableContext<S>
impl<S> ScalarVariableContext<S>
pub fn new( descriptor_index: usize, entity_type_name: &'static str, entity_count: fn(&S) -> usize, variable_name: &'static str, getter: fn(&S, usize) -> Option<usize>, setter: fn(&mut S, usize, Option<usize>), value_source: ValueSource<S>, allows_unassigned: bool, ) -> Self
pub fn matches_target( &self, entity_class: Option<&str>, variable_name: Option<&str>, ) -> bool
Trait Implementations§
Source§impl<S> Clone for ScalarVariableContext<S>
impl<S> Clone for ScalarVariableContext<S>
Source§impl<S> Debug for ScalarVariableContext<S>
impl<S> Debug for ScalarVariableContext<S>
impl<S> Copy for ScalarVariableContext<S>
Auto Trait Implementations§
impl<S> Freeze for ScalarVariableContext<S>
impl<S> RefUnwindSafe for ScalarVariableContext<S>
impl<S> Send for ScalarVariableContext<S>
impl<S> Sync for ScalarVariableContext<S>
impl<S> Unpin for ScalarVariableContext<S>
impl<S> UnsafeUnpin for ScalarVariableContext<S>
impl<S> UnwindSafe for ScalarVariableContext<S>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more