Struct fluent_syntax::ast::Resource
source · pub struct Resource<S> {
pub body: Vec<Entry<S>>,
}
Expand description
Root node of a Fluent Translation List.
A Resource
contains a body with a list of Entry
nodes.
§Example
use fluent_syntax::parser;
use fluent_syntax::ast;
let ftl = "";
let resource = parser::parse(ftl)
.expect("Failed to parse an FTL resource.");
assert_eq!(
resource,
ast::Resource {
body: vec![]
}
);
Fields§
§body: Vec<Entry<S>>
Trait Implementations§
source§impl<S: PartialEq> PartialEq for Resource<S>
impl<S: PartialEq> PartialEq for Resource<S>
impl<S> StructuralPartialEq for Resource<S>
Auto Trait Implementations§
impl<S> Freeze for Resource<S>
impl<S> RefUnwindSafe for Resource<S>where
S: RefUnwindSafe,
impl<S> Send for Resource<S>where
S: Send,
impl<S> Sync for Resource<S>where
S: Sync,
impl<S> Unpin for Resource<S>where
S: Unpin,
impl<S> UnwindSafe for Resource<S>where
S: UnwindSafe,
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