[−][src]Struct binjs::io::entropy::rw::PreludeStreams
Prelude data.
The prelude contains streams to read or write dictionary extensions for user-extensible symbols (aka "prelude dictionaries").
Examples of T
: LazyStream
(for writing) or Cursor<Vec<u8>>
(for reading).
Fields
identifier_names: T
Instances of IdentifierName.
To aid with compression, we typically store user-extensible strings as two distinct data structures:
- a single string, containing all concatenated strings without delimiter;
- a list of lengths, used to split the string into the successive strings.
identifier_names_len: T
property_keys: T
Instances of PropertyKey
To aid with compression, we typically store user-extensible strings as two distinct data structures:
- a single string, containing all concatenated strings without delimiter;
- a list of lengths, used to split the string into the successive strings.
property_keys_len: T
string_literals: T
Instances of string literals.
To aid with compression, we typically store user-extensible strings as two distinct data structures:
- a single string, containing all concatenated strings without delimiter;
- a list of lengths, used to split the string into the successive strings.
string_literals_len: T
interface_names: T
Instances of InterfaceName
string_enums: T
Instances of string enums.
list_lengths: T
Instances of list lengths.
floats: T
Instances of floating-point numbers.
unsigned_longs: T
Instances of unsigned longs.
Methods
impl<T> PreludeStreams<T>
[src]
pub fn with<F>(f: F) -> PreludeStreams<T> where
F: Fn(&str) -> T,
[src]
F: Fn(&str) -> T,
Create a new PreludeStreams.
pub fn into_iter(self) -> impl Iterator<Item = (&'static str, T)>
[src]
Iterate through fields of PreludeStreams.
pub fn get_mut_b(&mut self, field_name: &[u8]) -> Option<&mut T>
[src]
Access a field by its name, specified as a sequence of bytes.
This method is typically used to simplify parsing a file that
contains sections explicitly labelled "identifier_names",
"property_keys", etc.
In such case, field_name
is expected to be a user input.
Return None
if field_name
is not one of the field names.
Auto Trait Implementations
impl<T> RefUnwindSafe for PreludeStreams<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for PreludeStreams<T> where
T: Send,
T: Send,
impl<T> Sync for PreludeStreams<T> where
T: Sync,
T: Sync,
impl<T> Unpin for PreludeStreams<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for PreludeStreams<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,