Struct apollo_compiler::database::Source
source · pub struct Source { /* private fields */ }
Expand description
Represents a GraphQL source file.
Implementations§
source§impl Source
impl Source
sourcepub fn schema(filename: PathBuf, text: impl Into<Arc<str>>) -> Self
pub fn schema(filename: PathBuf, text: impl Into<Arc<str>>) -> Self
Create a GraphQL schema source file.
sourcepub fn executable(filename: PathBuf, text: impl Into<Arc<str>>) -> Self
pub fn executable(filename: PathBuf, text: impl Into<Arc<str>>) -> Self
Create a GraphQL executable source file.
sourcepub fn document(filename: PathBuf, text: impl Into<Arc<str>>) -> Self
pub fn document(filename: PathBuf, text: impl Into<Arc<str>>) -> Self
Create a GraphQL document source file.
A Document can contain type definitions and executable definitions. You can also use it when you don’t know the actual source type.
pub fn filename(&self) -> &Path
pub fn source_type(&self) -> SourceType
pub fn text(&self) -> Arc<str>
Trait Implementations§
source§impl PartialEq<Source> for Source
impl PartialEq<Source> for Source
impl Eq for Source
impl StructuralEq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.