#[repr(C, align(8))]pub struct llama_grammar_parser {
pub _bindgen_opaque_blob: [u64; 9],
}
Fields§
§_bindgen_opaque_blob: [u64; 9]
Implementations§
Source§impl llama_grammar_parser
impl llama_grammar_parser
pub unsafe fn c_rules(&self) -> llama_grammar_stack
pub unsafe fn get_symbol_id(&mut self, src: *const c_char, len: usize) -> u32
pub unsafe fn generate_symbol_id(&mut self, base_name: *const std_string) -> u32
pub unsafe fn add_rule(&mut self, rule_id: u32, rule: *const llama_grammar_rule)
pub unsafe fn parse_alternates( &mut self, src: *const c_char, rule_name: *const std_string, rule_id: u32, is_nested: bool, ) -> *const c_char
pub unsafe fn parse_sequence( &mut self, src: *const c_char, rule_name: *const std_string, rule: *mut llama_grammar_rule, is_nested: bool, ) -> *const c_char
pub unsafe fn parse_rule(&mut self, src: *const c_char) -> *const c_char
pub unsafe fn parse(&mut self, src: *const c_char) -> bool
pub unsafe fn print(&mut self, file: *mut FILE)
Trait Implementations§
Source§impl Clone for llama_grammar_parser
impl Clone for llama_grammar_parser
Source§fn clone(&self) -> llama_grammar_parser
fn clone(&self) -> llama_grammar_parser
Returns a copy 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 Debug for llama_grammar_parser
impl Debug for llama_grammar_parser
Source§impl PartialEq for llama_grammar_parser
impl PartialEq for llama_grammar_parser
impl Copy for llama_grammar_parser
impl StructuralPartialEq for llama_grammar_parser
Auto Trait Implementations§
impl Freeze for llama_grammar_parser
impl RefUnwindSafe for llama_grammar_parser
impl Send for llama_grammar_parser
impl Sync for llama_grammar_parser
impl Unpin for llama_grammar_parser
impl UnwindSafe for llama_grammar_parser
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