Struct FileSystemAdapter

Source
#[non_exhaustive]
pub struct FileSystemAdapter {}

Implementations§

Source§

impl FileSystemAdapter

Source

pub const SCHEMA_TEXT: &'static str = "schema {\r\n query: RootSchemaQuery\r\n}\r\ndirective @filter(\r\n \"\"\"\r\n Name of the filter operation to perform.\r\n \"\"\"\r\n op: String!\r\n \"\"\"\r\n List of string operands for the operator.\r\n \"\"\"\r\n value: [String!]\r\n) repeatable on FIELD | INLINE_FRAGMENT\r\ndirective @tag(\r\n \"\"\"\r\n Name to apply to the given property field.\r\n \"\"\"\r\n name: String\r\n) on FIELD\r\ndirective @output(\r\n \"\"\"\r\n What to designate the output field generated from this property field.\r\n \"\"\"\r\n name: String\r\n) on FIELD\r\ndirective @optional on FIELD\r\ndirective @recurse(\r\n \"\"\"\r\n Recurse up to this many times on this edge. A depth of 1 produces the current\r\n vertex and its immediate neighbors along the given edge.\r\n \"\"\"\r\n depth: Int!\r\n) on FIELD\r\ndirective @fold on FIELD\r\ndirective @transform(\r\n \"\"\"\r\n Name of the transformation operation to perform.\r\n \"\"\"\r\n op: String!\r\n) on FIELD\r\n\r\ntype RootSchemaQuery {\r\n Path(path: String!): Path!\r\n}\r\n\r\ninterface Path {\r\n path: String!\r\n\r\n}\r\n\r\ntype Folder implements Path {\r\n path: String!\r\n children: [Path!]\r\n}\r\n\r\ninterface File implements Path {\r\n path: String!\r\n size: Int!\r\n extension: String!\r\n Hash: String!\r\n}\r\n"

Source

pub fn schema() -> &'static Schema

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl<'a> Adapter<'a> for FileSystemAdapter

Source§

type Vertex = Vertex

The type of vertices in the dataset this adapter queries. Unless your intended vertex type is cheap to clone, consider wrapping it an Rc or Arc to make cloning it cheaper since that’s a fairly common operation when queries are evaluated.
Source§

fn resolve_starting_vertices( &self, edge_name: &Arc<str>, parameters: &EdgeParameters, resolve_info: &ResolveInfo, ) -> VertexIterator<'a, Self::Vertex>

Produce an iterator of vertices for the specified starting edge. Read more
Source§

fn resolve_property<V: AsVertex<Self::Vertex> + 'a>( &self, contexts: ContextIterator<'a, V>, type_name: &Arc<str>, property_name: &Arc<str>, resolve_info: &ResolveInfo, ) -> ContextOutcomeIterator<'a, V, FieldValue>

Resolve a property required by the query that’s being evaluated. Read more
Source§

fn resolve_neighbors<V: AsVertex<Self::Vertex> + 'a>( &self, contexts: ContextIterator<'a, V>, type_name: &Arc<str>, edge_name: &Arc<str>, parameters: &EdgeParameters, resolve_info: &ResolveEdgeInfo, ) -> ContextOutcomeIterator<'a, V, VertexIterator<'a, Self::Vertex>>

Resolve the neighboring vertices across an edge. Read more
Source§

fn resolve_coercion<V: AsVertex<Self::Vertex> + 'a>( &self, contexts: ContextIterator<'a, V>, _type_name: &Arc<str>, coerce_to_type: &Arc<str>, _resolve_info: &ResolveInfo, ) -> ContextOutcomeIterator<'a, V, bool>

Attempt to coerce vertices to a subtype, as required by the query that’s being evaluated. Read more
Source§

impl Debug for FileSystemAdapter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FileSystemAdapter

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.