pub struct RawCtxMetadata {
pub dtype: String,
pub shape: Option<Vec<usize>>,
pub nullable: Option<bool>,
pub extra: Option<Value>,
}Expand description
RawCtx input buffer descriptor provided by the host.
Fields§
§dtype: String§shape: Option<Vec<usize>>§nullable: Option<bool>§extra: Option<Value>Implementations§
Source§impl RawCtxMetadata
impl RawCtxMetadata
Sourcepub fn with_shape(self, shape: Vec<usize>) -> Self
pub fn with_shape(self, shape: Vec<usize>) -> Self
Attach an optional shape (e.g. [rows, cols]).
Sourcepub fn with_nullable(self, nullable: bool) -> Self
pub fn with_nullable(self, nullable: bool) -> Self
Mark whether the data is nullable.
Sourcepub fn with_extra(self, extra: JsonValue) -> Result<Self>
pub fn with_extra(self, extra: JsonValue) -> Result<Self>
Merge additional metadata fields (must be an object).
Trait Implementations§
Source§impl Clone for RawCtxMetadata
impl Clone for RawCtxMetadata
Source§fn clone(&self) -> RawCtxMetadata
fn clone(&self) -> RawCtxMetadata
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 moreAuto Trait Implementations§
impl Freeze for RawCtxMetadata
impl RefUnwindSafe for RawCtxMetadata
impl Send for RawCtxMetadata
impl Sync for RawCtxMetadata
impl Unpin for RawCtxMetadata
impl UnwindSafe for RawCtxMetadata
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