Struct SyminfoFields
pub struct SyminfoFields(/* private fields */);Expand description
Bitset of syminfo property fields requested by a compiled script.
Each bit corresponds to the index passed to @native.syminfo(N) in
crates/builtins/stdlib/syminfo.1.pine. The set is computed
statically during the visitor pass and stored on the compiled
Program so that [DataProvider::symbol_info]
can fetch only the fields that are actually used.
Implementations§
§impl SyminfoFields
impl SyminfoFields
pub const BASE_CURRENCY: SyminfoFields
pub const BASE_CURRENCY: SyminfoFields
syminfo.basecurrency — index 0
pub const COUNTRY: SyminfoFields
pub const COUNTRY: SyminfoFields
syminfo.country — index 1
pub const CURRENCY: SyminfoFields
pub const CURRENCY: SyminfoFields
syminfo.currency — index 2
pub const CURRENT_CONTRACT: SyminfoFields
pub const CURRENT_CONTRACT: SyminfoFields
syminfo.current_contract — index 3
pub const DESCRIPTION: SyminfoFields
pub const DESCRIPTION: SyminfoFields
syminfo.description — index 4
pub const EMPLOYEES: SyminfoFields
pub const EMPLOYEES: SyminfoFields
syminfo.employees — index 5
pub const EXPIRATION_DATE: SyminfoFields
pub const EXPIRATION_DATE: SyminfoFields
syminfo.expiration_date — index 6
pub const INDUSTRY: SyminfoFields
pub const INDUSTRY: SyminfoFields
syminfo.industry — index 7
pub const ISIN: SyminfoFields
pub const ISIN: SyminfoFields
syminfo.isin — index 8
pub const MIN_CONTRACT: SyminfoFields
pub const MIN_CONTRACT: SyminfoFields
syminfo.mincontract — index 9
pub const MIN_MOVE: SyminfoFields
pub const MIN_MOVE: SyminfoFields
syminfo.minmove — index 10
pub const MIN_TICK: SyminfoFields
pub const MIN_TICK: SyminfoFields
syminfo.mintick — index 11
pub const POINT_VALUE: SyminfoFields
pub const POINT_VALUE: SyminfoFields
syminfo.pointvalue — index 12
pub const PREFIX: SyminfoFields
pub const PREFIX: SyminfoFields
syminfo.prefix — index 13
pub const PRICE_SCALE: SyminfoFields
pub const PRICE_SCALE: SyminfoFields
syminfo.pricescale — index 14
pub const RECOMMENDATIONS_BUY: SyminfoFields
pub const RECOMMENDATIONS_BUY: SyminfoFields
syminfo.recommendations_buy — index 15
pub const RECOMMENDATIONS_BUY_STRONG: SyminfoFields
pub const RECOMMENDATIONS_BUY_STRONG: SyminfoFields
syminfo.recommendations_buy_strong — index 16
pub const RECOMMENDATIONS_HOLD: SyminfoFields
pub const RECOMMENDATIONS_HOLD: SyminfoFields
syminfo.recommendations_hold — index 17
pub const RECOMMENDATIONS_SELL: SyminfoFields
pub const RECOMMENDATIONS_SELL: SyminfoFields
syminfo.recommendations_sell — index 18
pub const RECOMMENDATIONS_SELL_STRONG: SyminfoFields
pub const RECOMMENDATIONS_SELL_STRONG: SyminfoFields
syminfo.recommendations_sell_strong — index 19
pub const RECOMMENDATIONS_DATE: SyminfoFields
pub const RECOMMENDATIONS_DATE: SyminfoFields
syminfo.recommendations_date — index 20
pub const RECOMMENDATIONS_TOTAL: SyminfoFields
pub const RECOMMENDATIONS_TOTAL: SyminfoFields
syminfo.recommendations_total — index 21
pub const ROOT: SyminfoFields
pub const ROOT: SyminfoFields
syminfo.root — index 22
pub const SECTOR: SyminfoFields
pub const SECTOR: SyminfoFields
syminfo.sector — index 23
pub const SESSION: SyminfoFields
pub const SESSION: SyminfoFields
syminfo.session — index 24
pub const SHAREHOLDERS: SyminfoFields
pub const SHAREHOLDERS: SyminfoFields
syminfo.shareholders — index 25
pub const SHARES_OUTSTANDING_FLOAT: SyminfoFields
pub const SHARES_OUTSTANDING_FLOAT: SyminfoFields
syminfo.shares_outstanding_float — index 26
pub const SHARES_OUTSTANDING_TOTAL: SyminfoFields
pub const SHARES_OUTSTANDING_TOTAL: SyminfoFields
syminfo.shares_outstanding_total — index 27
pub const TARGET_PRICE_AVERAGE: SyminfoFields
pub const TARGET_PRICE_AVERAGE: SyminfoFields
syminfo.target_price_average — index 28
pub const TARGET_PRICE_DATE: SyminfoFields
pub const TARGET_PRICE_DATE: SyminfoFields
syminfo.target_price_date — index 29
pub const TARGET_PRICE_ESTIMATES: SyminfoFields
pub const TARGET_PRICE_ESTIMATES: SyminfoFields
syminfo.target_price_estimates — index 30
pub const TARGET_PRICE_HIGH: SyminfoFields
pub const TARGET_PRICE_HIGH: SyminfoFields
syminfo.target_price_high — index 31
pub const TARGET_PRICE_LOW: SyminfoFields
pub const TARGET_PRICE_LOW: SyminfoFields
syminfo.target_price_low — index 32
pub const TARGET_PRICE_MEDIAN: SyminfoFields
pub const TARGET_PRICE_MEDIAN: SyminfoFields
syminfo.target_price_median — index 33
pub const TICKER: SyminfoFields
pub const TICKER: SyminfoFields
syminfo.ticker — index 34
pub const TICKERID: SyminfoFields
pub const TICKERID: SyminfoFields
syminfo.tickerid — index 35
pub const TIMEZONE: SyminfoFields
pub const TIMEZONE: SyminfoFields
syminfo.timezone — index 36
pub const TYPE: SyminfoFields
pub const TYPE: SyminfoFields
syminfo.type — index 37
pub const VOLUME_TYPE: SyminfoFields
pub const VOLUME_TYPE: SyminfoFields
syminfo.volumetype — index 38
pub const MAIN_TICKERID: SyminfoFields
pub const MAIN_TICKERID: SyminfoFields
syminfo.main_tickerid — index 39
§impl SyminfoFields
impl SyminfoFields
pub const fn empty() -> SyminfoFields
pub const fn empty() -> SyminfoFields
Get a flags value with all bits unset.
pub const fn all() -> SyminfoFields
pub const fn all() -> SyminfoFields
Get a flags value with all known bits set.
pub const fn bits(&self) -> u64
pub const fn bits(&self) -> u64
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
pub const fn from_bits(bits: u64) -> Option<SyminfoFields>
pub const fn from_bits(bits: u64) -> Option<SyminfoFields>
Convert from a bits value.
This method will return None if any unknown bits are set.
pub const fn from_bits_truncate(bits: u64) -> SyminfoFields
pub const fn from_bits_truncate(bits: u64) -> SyminfoFields
Convert from a bits value, unsetting any unknown bits.
pub const fn from_bits_retain(bits: u64) -> SyminfoFields
pub const fn from_bits_retain(bits: u64) -> SyminfoFields
Convert from a bits value exactly.
pub fn from_name(name: &str) -> Option<SyminfoFields>
pub fn from_name(name: &str) -> Option<SyminfoFields>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
pub const fn intersects(&self, other: SyminfoFields) -> bool
pub const fn intersects(&self, other: SyminfoFields) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
pub const fn contains(&self, other: SyminfoFields) -> bool
pub const fn contains(&self, other: SyminfoFields) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
pub fn insert(&mut self, other: SyminfoFields)
pub fn insert(&mut self, other: SyminfoFields)
The bitwise or (|) of the bits in two flags values.
pub fn remove(&mut self, other: SyminfoFields)
pub fn remove(&mut self, other: SyminfoFields)
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
pub fn toggle(&mut self, other: SyminfoFields)
pub fn toggle(&mut self, other: SyminfoFields)
The bitwise exclusive-or (^) of the bits in two flags values.
pub fn set(&mut self, other: SyminfoFields, value: bool)
pub fn set(&mut self, other: SyminfoFields, value: bool)
Call insert when value is true or remove when value is false.
pub const fn intersection(self, other: SyminfoFields) -> SyminfoFields
pub const fn intersection(self, other: SyminfoFields) -> SyminfoFields
The bitwise and (&) of the bits in two flags values.
pub const fn union(self, other: SyminfoFields) -> SyminfoFields
pub const fn union(self, other: SyminfoFields) -> SyminfoFields
The bitwise or (|) of the bits in two flags values.
pub const fn difference(self, other: SyminfoFields) -> SyminfoFields
pub const fn difference(self, other: SyminfoFields) -> SyminfoFields
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
pub const fn symmetric_difference(self, other: SyminfoFields) -> SyminfoFields
pub const fn symmetric_difference(self, other: SyminfoFields) -> SyminfoFields
The bitwise exclusive-or (^) of the bits in two flags values.
pub const fn complement(self) -> SyminfoFields
pub const fn complement(self) -> SyminfoFields
The bitwise negation (!) of the bits in a flags value, truncating the result.
§impl SyminfoFields
impl SyminfoFields
pub const fn iter(&self) -> Iter<SyminfoFields>
pub const fn iter(&self) -> Iter<SyminfoFields>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
pub const fn iter_names(&self) -> IterNames<SyminfoFields>
pub const fn iter_names(&self) -> IterNames<SyminfoFields>
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
§impl SyminfoFields
impl SyminfoFields
pub fn from_syminfo_attr(name: &str) -> Option<SyminfoFields>
pub fn from_syminfo_attr(name: &str) -> Option<SyminfoFields>
Map a field name (as used in @syminfo(name) attributes) to the
corresponding bit. Returns None for unrecognised names.
Trait Implementations§
§impl Binary for SyminfoFields
impl Binary for SyminfoFields
§impl BitAnd for SyminfoFields
impl BitAnd for SyminfoFields
§fn bitand(self, other: SyminfoFields) -> SyminfoFields
fn bitand(self, other: SyminfoFields) -> SyminfoFields
The bitwise and (&) of the bits in two flags values.
§type Output = SyminfoFields
type Output = SyminfoFields
& operator.§impl BitAndAssign for SyminfoFields
impl BitAndAssign for SyminfoFields
§fn bitand_assign(&mut self, other: SyminfoFields)
fn bitand_assign(&mut self, other: SyminfoFields)
The bitwise and (&) of the bits in two flags values.
§impl BitOr for SyminfoFields
impl BitOr for SyminfoFields
§fn bitor(self, other: SyminfoFields) -> SyminfoFields
fn bitor(self, other: SyminfoFields) -> SyminfoFields
The bitwise or (|) of the bits in two flags values.
§type Output = SyminfoFields
type Output = SyminfoFields
| operator.§impl BitOrAssign for SyminfoFields
impl BitOrAssign for SyminfoFields
§fn bitor_assign(&mut self, other: SyminfoFields)
fn bitor_assign(&mut self, other: SyminfoFields)
The bitwise or (|) of the bits in two flags values.
§impl BitXor for SyminfoFields
impl BitXor for SyminfoFields
§fn bitxor(self, other: SyminfoFields) -> SyminfoFields
fn bitxor(self, other: SyminfoFields) -> SyminfoFields
The bitwise exclusive-or (^) of the bits in two flags values.
§type Output = SyminfoFields
type Output = SyminfoFields
^ operator.§impl BitXorAssign for SyminfoFields
impl BitXorAssign for SyminfoFields
§fn bitxor_assign(&mut self, other: SyminfoFields)
fn bitxor_assign(&mut self, other: SyminfoFields)
The bitwise exclusive-or (^) of the bits in two flags values.
§impl Clone for SyminfoFields
impl Clone for SyminfoFields
§fn clone(&self) -> SyminfoFields
fn clone(&self) -> SyminfoFields
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for SyminfoFields
impl Debug for SyminfoFields
§impl Default for SyminfoFields
impl Default for SyminfoFields
§fn default() -> SyminfoFields
fn default() -> SyminfoFields
§impl<'de> Deserialize<'de> for SyminfoFields
impl<'de> Deserialize<'de> for SyminfoFields
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SyminfoFields, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SyminfoFields, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Extend<SyminfoFields> for SyminfoFields
impl Extend<SyminfoFields> for SyminfoFields
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = SyminfoFields>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = SyminfoFields>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)§impl Flags for SyminfoFields
impl Flags for SyminfoFields
§const FLAGS: &'static [Flag<SyminfoFields>]
const FLAGS: &'static [Flag<SyminfoFields>]
§fn from_bits_retain(bits: u64) -> SyminfoFields
fn from_bits_retain(bits: u64) -> SyminfoFields
§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
§fn iter_defined_names() -> IterDefinedNames<Self>
fn iter_defined_names() -> IterDefinedNames<Self>
Self::FLAGS].§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in two flags values.§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!). Read more§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in two flags values.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert] when value is true or [Flags::remove] when value is false.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in two flags values.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!). Read more§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in two flags values.§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in a flags value, truncating the result.§impl FromIterator<SyminfoFields> for SyminfoFields
impl FromIterator<SyminfoFields> for SyminfoFields
§fn from_iter<T>(iterator: T) -> SyminfoFieldswhere
T: IntoIterator<Item = SyminfoFields>,
fn from_iter<T>(iterator: T) -> SyminfoFieldswhere
T: IntoIterator<Item = SyminfoFields>,
The bitwise or (|) of the bits in each flags value.
§impl IntoIterator for SyminfoFields
impl IntoIterator for SyminfoFields
§type Item = SyminfoFields
type Item = SyminfoFields
§type IntoIter = Iter<SyminfoFields>
type IntoIter = Iter<SyminfoFields>
§fn into_iter(self) -> <SyminfoFields as IntoIterator>::IntoIter
fn into_iter(self) -> <SyminfoFields as IntoIterator>::IntoIter
§impl LowerHex for SyminfoFields
impl LowerHex for SyminfoFields
§impl Not for SyminfoFields
impl Not for SyminfoFields
§fn not(self) -> SyminfoFields
fn not(self) -> SyminfoFields
The bitwise negation (!) of the bits in a flags value, truncating the result.
§type Output = SyminfoFields
type Output = SyminfoFields
! operator.§impl Octal for SyminfoFields
impl Octal for SyminfoFields
§impl PartialEq for SyminfoFields
impl PartialEq for SyminfoFields
§impl Serialize for SyminfoFields
impl Serialize for SyminfoFields
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
§impl Sub for SyminfoFields
impl Sub for SyminfoFields
§fn sub(self, other: SyminfoFields) -> SyminfoFields
fn sub(self, other: SyminfoFields) -> SyminfoFields
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
§type Output = SyminfoFields
type Output = SyminfoFields
- operator.§impl SubAssign for SyminfoFields
impl SubAssign for SyminfoFields
§fn sub_assign(&mut self, other: SyminfoFields)
fn sub_assign(&mut self, other: SyminfoFields)
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
§impl UpperHex for SyminfoFields
impl UpperHex for SyminfoFields
impl Copy for SyminfoFields
impl Eq for SyminfoFields
impl StructuralPartialEq for SyminfoFields
Auto Trait Implementations§
impl Freeze for SyminfoFields
impl RefUnwindSafe for SyminfoFields
impl Send for SyminfoFields
impl Sync for SyminfoFields
impl Unpin for SyminfoFields
impl UnsafeUnpin for SyminfoFields
impl UnwindSafe for SyminfoFields
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.