pub struct LinksConstants<T: LinkReference> {
pub index_part: T,
pub source_part: T,
pub target_part: T,
pub null: T,
pub continue: T,
pub break: T,
pub skip: T,
pub any: T,
pub itself: T,
pub error: T,
pub internal_range: RangeInclusive<T>,
pub external_range: Option<RangeInclusive<T>>,
}Fields§
§index_part: T§source_part: T§target_part: T§null: T§continue: T§break: T§skip: T§any: T§itself: T§error: T§internal_range: RangeInclusive<T>§external_range: Option<RangeInclusive<T>>Implementations§
Source§impl<T: LinkReference> LinksConstants<T>
impl<T: LinkReference> LinksConstants<T>
Sourcepub fn full_new(
target_part: T,
internal: RangeInclusive<T>,
external: Option<RangeInclusive<T>>,
) -> Self
pub fn full_new( target_part: T, internal: RangeInclusive<T>, external: Option<RangeInclusive<T>>, ) -> Self
Creates constants with custom ranges, reserving the last six internal values for service constants.
§Panics
Panics if the external range overlaps the supplied internal range, including its service values.
pub fn via_external(target_part: T, external: bool) -> Self
Sourcepub fn via_ranges(
internal: RangeInclusive<T>,
external: Option<RangeInclusive<T>>,
) -> Self
pub fn via_ranges( internal: RangeInclusive<T>, external: Option<RangeInclusive<T>>, ) -> Self
Creates constants with the default target part and custom ranges.
§Panics
Panics if the external range overlaps the supplied internal range, including its service values.
pub fn via_only_external(external: bool) -> Self
Sourcepub fn external() -> Self
pub fn external() -> Self
Creates constants with external references starting immediately after the service values.
pub fn internal() -> Self
pub fn new() -> Self
pub fn is_internal(&self, address: T) -> bool
pub fn is_external(&self, address: T) -> bool
pub fn is_reference(&self, address: T) -> bool
Trait Implementations§
Source§impl<T: Clone + LinkReference> Clone for LinksConstants<T>
impl<T: Clone + LinkReference> Clone for LinksConstants<T>
Source§impl<T: Debug + LinkReference> Debug for LinksConstants<T>
impl<T: Debug + LinkReference> Debug for LinksConstants<T>
Source§impl<T: LinkReference> Default for LinksConstants<T>
impl<T: LinkReference> Default for LinksConstants<T>
impl<T: Eq + LinkReference> Eq for LinksConstants<T>
Source§impl<T: PartialEq + LinkReference> PartialEq for LinksConstants<T>
impl<T: PartialEq + LinkReference> PartialEq for LinksConstants<T>
impl<T: PartialEq + LinkReference> StructuralPartialEq for LinksConstants<T>
Auto Trait Implementations§
impl<T> Freeze for LinksConstants<T>
impl<T> RefUnwindSafe for LinksConstants<T>
impl<T> Send for LinksConstants<T>
impl<T> Sync for LinksConstants<T>
impl<T> Unpin for LinksConstants<T>
impl<T> UnsafeUnpin for LinksConstants<T>
impl<T> UnwindSafe for LinksConstants<T>
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