pub struct ObjectIdScalar { /* private fields */ }
Expand description
Represents an Arrow scalar with a ObjectIdEncoding.
Implementations§
Source§impl ObjectIdScalar
impl ObjectIdScalar
Sourcepub fn try_new(
encoding: ObjectIdEncoding,
value: ScalarValue,
) -> Result<ObjectIdScalar, DataFusionError>
pub fn try_new( encoding: ObjectIdEncoding, value: ScalarValue, ) -> Result<ObjectIdScalar, DataFusionError>
Tries to create a new ObjectIdScalar from a regular ScalarValue.
§Errors
Returns an error if the data type of value
is unexpected.
Sourcepub fn new_unchecked(
encoding: ObjectIdEncoding,
inner: ScalarValue,
) -> ObjectIdScalar
pub fn new_unchecked( encoding: ObjectIdEncoding, inner: ScalarValue, ) -> ObjectIdScalar
Creates a new ObjectIdScalar without checking invariants.
Sourcepub fn null(encoding: ObjectIdEncoding) -> ObjectIdScalar
pub fn null(encoding: ObjectIdEncoding) -> ObjectIdScalar
Creates a new ObjectIdScalar from the given object_id
.
Sourcepub fn from_object_id(
encoding: ObjectIdEncoding,
object_id: ObjectId,
) -> ObjectIdScalar
pub fn from_object_id( encoding: ObjectIdEncoding, object_id: ObjectId, ) -> ObjectIdScalar
Creates a new ObjectIdScalar from the given object_id
.
Trait Implementations§
Source§impl EncodingScalar for ObjectIdScalar
impl EncodingScalar for ObjectIdScalar
Source§type Encoding = ObjectIdEncoding
type Encoding = ObjectIdEncoding
The encoding used by this scalar.
Source§fn encoding(&self) -> &<ObjectIdScalar as EncodingScalar>::Encoding
fn encoding(&self) -> &<ObjectIdScalar 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
.Auto Trait Implementations§
impl Freeze for ObjectIdScalar
impl !RefUnwindSafe for ObjectIdScalar
impl Send for ObjectIdScalar
impl Sync for ObjectIdScalar
impl Unpin for ObjectIdScalar
impl !UnwindSafe for ObjectIdScalar
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> 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