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) -> DFResult<Self>
pub fn try_new(encoding: ObjectIdEncoding, value: ScalarValue) -> DFResult<Self>
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) -> Self
pub fn new_unchecked(encoding: ObjectIdEncoding, inner: ScalarValue) -> Self
Creates a new ObjectIdScalar without checking invariants.
Sourcepub fn null(encoding: ObjectIdEncoding) -> Self
pub fn null(encoding: ObjectIdEncoding) -> Self
Creates a new ObjectIdScalar from the given object_id
.
Sourcepub fn from_object_id(encoding: ObjectIdEncoding, object_id: ObjectId) -> Self
pub fn from_object_id(encoding: ObjectIdEncoding, object_id: ObjectId) -> Self
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 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.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