pub struct MetadataOptions {
pub name: Option<String>,
pub encoding: Option<String>,
pub default_word_cost: Option<i32>,
pub default_left_context_id: Option<u32>,
pub default_right_context_id: Option<u32>,
pub default_field_value: Option<String>,
pub flexible_csv: Option<bool>,
pub skip_invalid_cost_or_id: Option<bool>,
pub normalize_details: Option<bool>,
}Expand description
Options for creating a Metadata instance.
All fields are optional. When omitted, default values are used.
Fields§
§name: Option<String>Dictionary name (default: “default”).
encoding: Option<String>Character encoding (default: “UTF-8”).
default_word_cost: Option<i32>Default cost for unknown words (default: -10000).
default_left_context_id: Option<u32>Default left context ID (default: 1288).
default_right_context_id: Option<u32>Default right context ID (default: 1288).
default_field_value: Option<String>Default value for missing fields (default: “*”).
flexible_csv: Option<bool>Allow flexible CSV parsing (default: false).
skip_invalid_cost_or_id: Option<bool>Skip entries with invalid cost or ID (default: false).
normalize_details: Option<bool>Normalize morphological details (default: false).
Trait Implementations§
Source§impl FromNapiValue for MetadataOptions
impl FromNapiValue for MetadataOptions
Source§unsafe fn from_napi_value(
env: napi_env,
napi_val: napi_value,
) -> Result<MetadataOptions>
unsafe fn from_napi_value( env: napi_env, napi_val: napi_value, ) -> Result<MetadataOptions>
Safety Read more
fn from_unknown(value: Unknown<'_>) -> Result<Self, Error>
Source§impl ToNapiValue for MetadataOptions
impl ToNapiValue for MetadataOptions
Source§unsafe fn to_napi_value(
env: napi_env,
val: MetadataOptions,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: MetadataOptions, ) -> Result<napi_value>
Safety Read more
fn into_unknown(self, env: &Env) -> Result<Unknown<'_>, Error>
Source§impl TypeName for MetadataOptions
impl TypeName for MetadataOptions
Source§impl ValidateNapiValue for MetadataOptions
impl ValidateNapiValue for MetadataOptions
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for MetadataOptions
impl RefUnwindSafe for MetadataOptions
impl Send for MetadataOptions
impl Sync for MetadataOptions
impl Unpin for MetadataOptions
impl UnsafeUnpin for MetadataOptions
impl UnwindSafe for MetadataOptions
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> JsValuesTupleIntoVec for Twhere
T: ToNapiValue,
impl<T> JsValuesTupleIntoVec for Twhere
T: ToNapiValue,
fn into_vec(self, env: *mut napi_env__) -> Result<Vec<*mut napi_value__>, Error>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.