[−][src]Struct cpclib_basic::BasicLine
Basic line of code representation
Methods
impl BasicLine[src]
pub fn line_number(&self) -> u16[src]
pub fn new(line_number: u16, tokens: &[BasicToken]) -> Self[src]
Create a line with its content
pub fn add_length(&mut self, length: u16)[src]
pub fn set_length(&mut self, length: u16)[src]
pub fn forced_length(&self) -> u16[src]
Return the forced line length or the real line length if not specified
pub fn real_length(&self) -> u16[src]
Return the byte size taken by the tokens
pub fn len(&self) -> usize[src]
Returns the number of tokens
pub fn is_empty(&self) -> bool[src]
Verify if there are tokens
pub fn as_bytes(&self) -> Vec<u8>[src]
Returns the encoded line.
- 2 bytes for data length -- Could be different than reallity when playing with hidden lines
- 2 bytes for line number
- n bytes for tokens
- 1 bytes for end of line marker
pub fn tokens(&self) -> &[BasicToken][src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BasicLine
impl Send for BasicLine
impl Sync for BasicLine
impl Unpin for BasicLine
impl UnwindSafe for BasicLine
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> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
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>,