pub struct PlainTermScalar { /* private fields */ }
Expand description
Represents an Arrow scalar with a PlainTermEncoding.
Implementations§
Source§impl PlainTermScalar
impl PlainTermScalar
Sourcepub fn try_new(value: ScalarValue) -> Result<PlainTermScalar, DataFusionError>
pub fn try_new(value: ScalarValue) -> Result<PlainTermScalar, DataFusionError>
Tries to create a new PlainTermScalar from a regular ScalarValue.
§Errors
Returns an error if the data type of value
is unexpected.
Sourcepub fn from_graph_name(
graph_name: GraphNameRef<'_>,
) -> Result<PlainTermScalar, DataFusionError>
pub fn from_graph_name( graph_name: GraphNameRef<'_>, ) -> Result<PlainTermScalar, DataFusionError>
Creates a new PlainTermScalar from the given graph_name
.
Sourcepub fn new_unchecked(inner: ScalarValue) -> PlainTermScalar
pub fn new_unchecked(inner: ScalarValue) -> PlainTermScalar
Creates a new PlainTermScalar without checking invariants.
Trait Implementations§
Source§impl Clone for PlainTermScalar
impl Clone for PlainTermScalar
Source§fn clone(&self) -> PlainTermScalar
fn clone(&self) -> PlainTermScalar
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 moreSource§impl EncodingScalar for PlainTermScalar
impl EncodingScalar for PlainTermScalar
Source§type Encoding = PlainTermEncoding
type Encoding = PlainTermEncoding
The encoding used by this scalar.
Source§fn encoding(&self) -> &<PlainTermScalar as EncodingScalar>::Encoding
fn encoding(&self) -> &<PlainTermScalar as EncodingScalar>::Encoding
Obtains the encoding instance for this scalar.
Source§fn scalar_value(&self) -> &ScalarValue
fn scalar_value(&self) -> &ScalarValue
Returns a reference to the inner scalar value.
Source§fn into_scalar_value(self) -> ScalarValue
fn into_scalar_value(self) -> ScalarValue
Consumes
self
and returns the inner scalar value.Source§fn to_array(
&self,
number_of_rows: usize,
) -> Result<<Self::Encoding as TermEncoding>::Array, DataFusionError>
fn to_array( &self, number_of_rows: usize, ) -> Result<<Self::Encoding as TermEncoding>::Array, DataFusionError>
Produces a new array with
number_of_rows
.Source§impl<'a> From<&'a PlainTermScalar> for GraphNameRef<'a>
impl<'a> From<&'a PlainTermScalar> for GraphNameRef<'a>
Source§fn from(value: &'a PlainTermScalar) -> GraphNameRef<'a>
fn from(value: &'a PlainTermScalar) -> GraphNameRef<'a>
Converts to this type from the input type.
Source§impl From<BlankNodeRef<'_>> for PlainTermScalar
impl From<BlankNodeRef<'_>> for PlainTermScalar
Source§fn from(term: BlankNodeRef<'_>) -> PlainTermScalar
fn from(term: BlankNodeRef<'_>) -> PlainTermScalar
Converts to this type from the input type.
Source§impl From<LiteralRef<'_>> for PlainTermScalar
impl From<LiteralRef<'_>> for PlainTermScalar
Source§fn from(term: LiteralRef<'_>) -> PlainTermScalar
fn from(term: LiteralRef<'_>) -> PlainTermScalar
Converts to this type from the input type.
Source§impl From<NamedNodeRef<'_>> for PlainTermScalar
impl From<NamedNodeRef<'_>> for PlainTermScalar
Source§fn from(term: NamedNodeRef<'_>) -> PlainTermScalar
fn from(term: NamedNodeRef<'_>) -> PlainTermScalar
Converts to this type from the input type.
Source§impl From<NamedOrBlankNodeRef<'_>> for PlainTermScalar
impl From<NamedOrBlankNodeRef<'_>> for PlainTermScalar
Source§fn from(term: NamedOrBlankNodeRef<'_>) -> PlainTermScalar
fn from(term: NamedOrBlankNodeRef<'_>) -> PlainTermScalar
Converts to this type from the input type.
Source§impl From<Term> for PlainTermScalar
impl From<Term> for PlainTermScalar
Source§fn from(term: Term) -> PlainTermScalar
fn from(term: Term) -> PlainTermScalar
Converts to this type from the input type.
Source§impl From<TermRef<'_>> for PlainTermScalar
impl From<TermRef<'_>> for PlainTermScalar
Source§fn from(term: TermRef<'_>) -> PlainTermScalar
fn from(term: TermRef<'_>) -> PlainTermScalar
Converts to this type from the input type.
Source§impl TryFrom<ScalarValue> for PlainTermScalar
impl TryFrom<ScalarValue> for PlainTermScalar
Source§type Error = DataFusionError
type Error = DataFusionError
The type returned in the event of a conversion error.
Source§fn try_from(
value: ScalarValue,
) -> Result<PlainTermScalar, <PlainTermScalar as TryFrom<ScalarValue>>::Error>
fn try_from( value: ScalarValue, ) -> Result<PlainTermScalar, <PlainTermScalar as TryFrom<ScalarValue>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for PlainTermScalar
impl !RefUnwindSafe for PlainTermScalar
impl Send for PlainTermScalar
impl Sync for PlainTermScalar
impl Unpin for PlainTermScalar
impl !UnwindSafe for PlainTermScalar
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> 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