pub struct TraceBinding {
pub span: SourceSpan,
pub name: Option<Identifier>,
pub segment: TraceSegmentId,
pub offset: usize,
pub size: usize,
pub ty: Type,
}Expand description
TraceBinding is used to represent one or more columns in the execution trace that are bound to a name. For single columns, the size is 1. For groups, the size is the number of columns in the group. The offset is the column index in the trace where the first column of the binding starts.
Fields§
§span: SourceSpan§name: Option<Identifier>The name of this binding, if applicable
segment: TraceSegmentIdThe id of the segment to which this binding belongs
offset: usizeThe offset to the first column of the segment which is bound by this binding
size: usizeThe number of columns which are bound
ty: TypeThe effective type of this binding
Implementations§
Source§impl TraceBinding
impl TraceBinding
Sourcepub const fn new(
span: SourceSpan,
name: Identifier,
segment: TraceSegmentId,
offset: usize,
size: usize,
ty: Type,
) -> Self
pub const fn new( span: SourceSpan, name: Identifier, segment: TraceSegmentId, offset: usize, size: usize, ty: Type, ) -> Self
Creates a new trace binding.
Sourcepub fn ty(&self) -> Type
pub fn ty(&self) -> Type
Returns a Type that describes what type of value this binding represents
pub fn is_scalar(&self) -> bool
Sourcepub fn access(
&self,
access_type: AccessType,
) -> Result<Self, InvalidAccessError>
pub fn access( &self, access_type: AccessType, ) -> Result<Self, InvalidAccessError>
Derive a new TraceBinding derived from the current one given an AccessType
Trait Implementations§
Source§impl Clone for TraceBinding
impl Clone for TraceBinding
Source§fn clone(&self) -> TraceBinding
fn clone(&self) -> TraceBinding
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 moreSource§impl Debug for TraceBinding
impl Debug for TraceBinding
Source§impl Display for TraceBinding
impl Display for TraceBinding
Source§impl PartialEq for TraceBinding
impl PartialEq for TraceBinding
Source§impl Spanned for TraceBinding
impl Spanned for TraceBinding
fn span(&self) -> SourceSpan
impl Copy for TraceBinding
impl Eq for TraceBinding
Auto Trait Implementations§
impl Freeze for TraceBinding
impl RefUnwindSafe for TraceBinding
impl Send for TraceBinding
impl Sync for TraceBinding
impl Unpin for TraceBinding
impl UnsafeUnpin for TraceBinding
impl UnwindSafe for TraceBinding
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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