[−][src]Struct fastobo::ast::Line
A line in an OBO file, possibly followed by qualifiers and a comment.
Methods
impl<T> Line<T>
[src]
pub fn and_comment<C>(self, comment: C) -> Self where
C: Into<Option<Comment>>,
[src]
C: Into<Option<Comment>>,
Update the line comment with the given one.
Example
let line = Line::from(TermClause::IsObsolete(true)) .and_comment(Comment::new("deprecated in v3")); assert_eq!(line.to_string(), "is_obsolete: true ! deprecated in v3\n");
pub fn and_qualifiers<Q>(self, qualifiers: Q) -> Self where
Q: Into<Option<QualifierList>>,
[src]
Q: Into<Option<QualifierList>>,
Update the line qualifier list with the given one.
pub fn qualifiers(&self) -> Option<&QualifierList>
[src]
pub fn qualifiers_mut(&mut self) -> Option<&mut QualifierList>
[src]
pub fn comment(&self) -> Option<&Comment>
[src]
pub fn comment_mut(&mut self) -> Option<&mut Comment>
[src]
pub fn as_inner(&self) -> &T
[src]
Get a reference to the OBO clause wrapped in the line.
pub fn as_inner_mut(&mut self) -> &mut T
[src]
Get a mutable reference to the OBO clause wrapped in the line.
pub fn into_inner(self) -> T
[src]
Get the actual OBO clause wrapped in the line.
Trait Implementations
impl<'i> FromPair<'i> for Line<InstanceClause>
[src]
const RULE: Rule
[src]
unsafe fn from_pair_unchecked(pair: Pair<'i, Rule>) -> Result<Self, SyntaxError>
[src]
fn from_pair(pair: Pair<'i, Rule>) -> Result<Self, SyntaxError>
[src]
Create a new instance from a Pair
.
impl<'i> FromPair<'i> for Line<TermClause>
[src]
const RULE: Rule
[src]
unsafe fn from_pair_unchecked(pair: Pair<'i, Rule>) -> Result<Self, SyntaxError>
[src]
fn from_pair(pair: Pair<'i, Rule>) -> Result<Self, SyntaxError>
[src]
Create a new instance from a Pair
.
impl<'i> FromPair<'i> for Line<TypedefClause>
[src]
const RULE: Rule
[src]
unsafe fn from_pair_unchecked(pair: Pair<'i, Rule>) -> Result<Self, SyntaxError>
[src]
fn from_pair(pair: Pair<'i, Rule>) -> Result<Self, SyntaxError>
[src]
Create a new instance from a Pair
.
impl<T: Clone> Clone for Line<T>
[src]
fn clone(&self) -> Line<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Ord> Ord for Line<T>
[src]
fn cmp(&self, other: &Line<T>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl<T> AsRef<T> for Line<T>
[src]
impl<T> From<T> for Line<T>
[src]
impl From<Line<ClassIdent>> for TermFrame
[src]
Create a new term frame with the frame ID given as a Line
.
fn from(line: Line<ClassIdent>) -> Self
[src]
impl<T: PartialOrd> PartialOrd<Line<T>> for Line<T>
[src]
fn partial_cmp(&self, other: &Line<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &Line<T>) -> bool
[src]
fn le(&self, other: &Line<T>) -> bool
[src]
fn gt(&self, other: &Line<T>) -> bool
[src]
fn ge(&self, other: &Line<T>) -> bool
[src]
impl<T: PartialEq> PartialEq<Line<T>> for Line<T>
[src]
impl<T> AsMut<T> for Line<T>
[src]
impl<T: Eq> Eq for Line<T>
[src]
impl<T> DerefMut for Line<T>
[src]
impl<T> Display for Line<T> where
T: Display,
[src]
T: Display,
impl<T: Debug> Debug for Line<T>
[src]
impl<T> Deref for Line<T>
[src]
impl<T: Hash> Hash for Line<T>
[src]
fn hash<__HT: Hasher>(&self, state: &mut __HT)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl FromStr for Line<InstanceClause>
[src]
type Err = SyntaxError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl FromStr for Line<TermClause>
[src]
type Err = SyntaxError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl FromStr for Line<TypedefClause>
[src]
type Err = SyntaxError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl<T> BorrowMut<T> for Line<T>
[src]
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for Line<T>
[src]
Auto Trait Implementations
impl<T> Sync for Line<T> where
T: Sync,
T: Sync,
impl<T> Send for Line<T> where
T: Send,
T: Send,
impl<T> Unpin for Line<T> where
T: Unpin,
T: Unpin,
impl<T> RefUnwindSafe for Line<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> UnwindSafe for Line<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
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<T, V> SliceConcat<T> for V where
T: Clone,
V: Borrow<[T]>,
[src]
T: Clone,
V: Borrow<[T]>,
type Output = Vec<T>
slice_concat_trait
)The resulting type after concatenation
fn concat(slice: &[V]) -> Vec<T>
[src]
fn join(slice: &[V], sep: &T) -> Vec<T>
[src]
impl<S> SliceConcat<str> for S where
S: Borrow<str>,
[src]
S: Borrow<str>,
type Output = String
slice_concat_trait
)The resulting type after concatenation
fn concat(slice: &[S]) -> String
[src]
fn join(slice: &[S], sep: &str) -> String
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,